Page Contents
Home > @loopback/authorization
authorization package
A LoopBack 4 component for authorization support (Role based, Permission based, Vote based)
To read on key building blocks read through LoopBack authorization docs
Classes
Class
Description
[AuthorizationComponent](/doc/en/lb4/apidocs.authorization.authorizationcomponent.html)
[AuthorizationError](/doc/en/lb4/apidocs.authorization.authorizationerror.html)
The custom error class that describes the error thrown by the authorization module. Should be extracted to the common layer shared by authentication and authorization.
[AuthorizationInterceptor](/doc/en/lb4/apidocs.authorization.authorizationinterceptor.html)
[AuthorizeMethodDecoratorFactory](/doc/en/lb4/apidocs.authorization.authorizemethoddecoratorfactory.html)
Enumerations
Enumeration
Description
[AuthorizationDecision](/doc/en/lb4/apidocs.authorization.authorizationdecision.html)
Decisions for authorization
Functions
Function
Description
[authorize(spec)](/doc/en/lb4/apidocs.authorization.authorize.html)
Decorator `@authorize` to mark methods that require authorization
[getAuthorizationMetadata(target, methodName)](/doc/en/lb4/apidocs.authorization.getauthorizationmetadata.html)
Fetch authorization metadata stored by `@authorize` decorator.
Interfaces
Interface
Description
[AuthorizationContext](/doc/en/lb4/apidocs.authorization.authorizationcontext.html)
Request context for authorization
[AuthorizationMetadata](/doc/en/lb4/apidocs.authorization.authorizationmetadata.html)
Authorization metadata supplied via `@authorize` decorator
[AuthorizationOptions](/doc/en/lb4/apidocs.authorization.authorizationoptions.html)
[AuthorizationRequest](/doc/en/lb4/apidocs.authorization.authorizationrequest.html)
Inspired by https://github.com/casbin/node-casbin
[Enforcer](/doc/en/lb4/apidocs.authorization.enforcer.html)
An enforcer of authorization policies
Namespaces
Namespace
Description
[AuthorizationBindings](/doc/en/lb4/apidocs.authorization.authorizationbindings.html)
Binding keys used by authorization component.
[AuthorizationTags](/doc/en/lb4/apidocs.authorization.authorizationtags.html)
Binding tags used by authorization component
[authorize](/doc/en/lb4/apidocs.authorization.authorize.html)
Variables
Variable
Description
[ANONYMOUS](/doc/en/lb4/apidocs.authorization.anonymous.html)
[AUTHENTICATED](/doc/en/lb4/apidocs.authorization.authenticated.html)
[AUTHORIZATION\_CLASS\_KEY](/doc/en/lb4/apidocs.authorization.authorization_class_key.html)
[AUTHORIZATION\_METHOD\_KEY](/doc/en/lb4/apidocs.authorization.authorization_method_key.html)
[EVERYONE](/doc/en/lb4/apidocs.authorization.everyone.html)
Built-in roles
[UNAUTHENTICATED](/doc/en/lb4/apidocs.authorization.unauthenticated.html)
Type Aliases
Type Alias
Description
[Authorizer](/doc/en/lb4/apidocs.authorization.authorizer.html)
A function to decide if access to the target should be allowed or denied