Page Contents

Home > @loopback/authorization > AuthorizationContext

AuthorizationContext interface

Request context for authorization

Signature:

export interface AuthorizationContext 

Properties

Property Modifiers Type Description
[invocationContext](/doc/en/lb4/apidocs.authorization.authorizationcontext.invocationcontext.html) [InvocationContext](/doc/en/lb4/apidocs.context.invocationcontext.html) Context for the invocation
[principals](/doc/en/lb4/apidocs.authorization.authorizationcontext.principals.html) [Principal](/doc/en/lb4/apidocs.security.principal.html)\[\] An array of principals identified for the request - it should come from authentication
[resource](/doc/en/lb4/apidocs.authorization.authorizationcontext.resource.html) string An name for the target resource to be accessed, such as `OrderController.prototype.cancelOrder`
[roles](/doc/en/lb4/apidocs.authorization.authorizationcontext.roles.html) [Role](/doc/en/lb4/apidocs.security.role.html)\[\] An array of roles for principals
[scopes](/doc/en/lb4/apidocs.authorization.authorizationcontext.scopes.html) string\[\] An array of scopes representing granted permissions - usually come from access tokens