UNPKG

@loopback/docs

Version:
1,285 lines (1,284 loc) 42.1 kB
{ "metadata": { "toolPackage": "@microsoft/api-extractor", "toolVersion": "7.6.2", "schemaVersion": 1003, "oldestForwardsCompatibleVersion": 1001 }, "kind": "Package", "canonicalReference": "@loopback/security!", "docComment": "", "name": "@loopback/security", "members": [ { "kind": "EntryPoint", "canonicalReference": "@loopback/security!", "name": "", "members": [ { "kind": "Interface", "canonicalReference": "@loopback/security!ClientApplication:interface", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "export interface ClientApplication extends " }, { "kind": "Reference", "text": "Principal", "canonicalReference": "@loopback/security!Principal:interface" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "ClientApplication", "members": [], "extendsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] }, { "kind": "Interface", "canonicalReference": "@loopback/security!Credential:interface", "docComment": "/**\n * Security attributes used to authenticate the subject. Such credentials include passwords, Kerberos tickets, and public key certificates.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface Credential " } ], "releaseTag": "Public", "name": "Credential", "members": [], "extendsTokenRanges": [] }, { "kind": "Class", "canonicalReference": "@loopback/security!DefaultSubject:class", "docComment": "/**\n * Default implementation of `Subject`\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare class DefaultSubject implements " }, { "kind": "Reference", "text": "Subject", "canonicalReference": "@loopback/security!Subject:interface" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "DefaultSubject", "members": [ { "kind": "Method", "canonicalReference": "@loopback/security!DefaultSubject#addApplication:member(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "addApplication(app: " }, { "kind": "Reference", "text": "ClientApplication", "canonicalReference": "@loopback/security!ClientApplication:interface" }, { "kind": "Content", "text": "): " }, { "kind": "Content", "text": "void" }, { "kind": "Content", "text": ";" } ], "isStatic": false, "returnTypeTokenRange": { "startIndex": 3, "endIndex": 4 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "app", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 2 } } ], "name": "addApplication" }, { "kind": "Method", "canonicalReference": "@loopback/security!DefaultSubject#addAuthority:member(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "addAuthority(...authorities: " }, { "kind": "Reference", "text": "Permission", "canonicalReference": "@loopback/security!Permission:class" }, { "kind": "Content", "text": "[]" }, { "kind": "Content", "text": "): " }, { "kind": "Content", "text": "void" }, { "kind": "Content", "text": ";" } ], "isStatic": false, "returnTypeTokenRange": { "startIndex": 4, "endIndex": 5 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "authorities", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 3 } } ], "name": "addAuthority" }, { "kind": "Method", "canonicalReference": "@loopback/security!DefaultSubject#addCredential:member(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "addCredential(...credentials: " }, { "kind": "Reference", "text": "Credential", "canonicalReference": "@loopback/security!Credential:interface" }, { "kind": "Content", "text": "[]" }, { "kind": "Content", "text": "): " }, { "kind": "Content", "text": "void" }, { "kind": "Content", "text": ";" } ], "isStatic": false, "returnTypeTokenRange": { "startIndex": 4, "endIndex": 5 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "credentials", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 3 } } ], "name": "addCredential" }, { "kind": "Method", "canonicalReference": "@loopback/security!DefaultSubject#addUser:member(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "addUser(...users: " }, { "kind": "Reference", "text": "UserProfile", "canonicalReference": "@loopback/security!UserProfile:interface" }, { "kind": "Content", "text": "[]" }, { "kind": "Content", "text": "): " }, { "kind": "Content", "text": "void" }, { "kind": "Content", "text": ";" } ], "isStatic": false, "returnTypeTokenRange": { "startIndex": 4, "endIndex": 5 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "users", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 3 } } ], "name": "addUser" }, { "kind": "Property", "canonicalReference": "@loopback/security!DefaultSubject#authorities:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "readonly authorities: " }, { "kind": "Reference", "text": "Set", "canonicalReference": "!Set:interface" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "Permission", "canonicalReference": "@loopback/security!Permission:class" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "authorities", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 5 }, "isStatic": false }, { "kind": "Property", "canonicalReference": "@loopback/security!DefaultSubject#credentials:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "readonly credentials: " }, { "kind": "Reference", "text": "Set", "canonicalReference": "!Set:interface" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "Credential", "canonicalReference": "@loopback/security!Credential:interface" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "credentials", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 5 }, "isStatic": false }, { "kind": "Method", "canonicalReference": "@loopback/security!DefaultSubject#getPrincipal:member(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "getPrincipal(type: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": "): " }, { "kind": "Reference", "text": "Principal", "canonicalReference": "@loopback/security!Principal:interface" }, { "kind": "Content", "text": " | undefined" }, { "kind": "Content", "text": ";" } ], "isStatic": false, "returnTypeTokenRange": { "startIndex": 3, "endIndex": 5 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "type", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 2 } } ], "name": "getPrincipal" }, { "kind": "Property", "canonicalReference": "@loopback/security!DefaultSubject#principals:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "readonly principals: " }, { "kind": "Reference", "text": "Set", "canonicalReference": "!Set:interface" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "TypedPrincipal", "canonicalReference": "@loopback/security!TypedPrincipal:class" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "principals", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 5 }, "isStatic": false } ], "implementsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] }, { "kind": "Interface", "canonicalReference": "@loopback/security!Organization:interface", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "export interface Organization extends " }, { "kind": "Reference", "text": "Principal", "canonicalReference": "@loopback/security!Principal:interface" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "Organization", "members": [], "extendsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] }, { "kind": "Class", "canonicalReference": "@loopback/security!Permission:class", "docComment": "/**\n * `Permission` defines an action/access against a protected resource. It's the `what` for security.\n *\n * There are three levels of permissions\n *\n * - Resource level (Order, User) - Instance level (Order-0001, User-1001) - Property level (User-0001.email)\n *\n * @example\n *\n * - create a user (action: create, resource type: user) - read email of a user (action: read, resource property: user.email) - change email of a user (action: update, resource property: user.email) - cancel an order (action: delete, resource type: order)\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare class Permission " } ], "releaseTag": "Public", "name": "Permission", "members": [ { "kind": "Property", "canonicalReference": "@loopback/security!Permission#action:member", "docComment": "/**\n * Action or access of a protected resources, such as `read`, `create`, `update`, or `delete`\n */\n", "excerptTokens": [ { "kind": "Content", "text": "action: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "action", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 }, "isStatic": false }, { "kind": "Property", "canonicalReference": "@loopback/security!Permission#resourceId:member", "docComment": "/**\n * Identity of a protected resource instance, such as `order-0001` or `customer-101`\n */\n", "excerptTokens": [ { "kind": "Content", "text": "resourceId?: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "resourceId", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 }, "isStatic": false }, { "kind": "Property", "canonicalReference": "@loopback/security!Permission#resourceProperty:member", "docComment": "/**\n * Property of a protected resource type/instance, such as `email`\n */\n", "excerptTokens": [ { "kind": "Content", "text": "resourceProperty?: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "resourceProperty", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 }, "isStatic": false }, { "kind": "Property", "canonicalReference": "@loopback/security!Permission#resourceType:member", "docComment": "/**\n * Type of protected resource, such as `Order` or `Customer`\n */\n", "excerptTokens": [ { "kind": "Content", "text": "resourceType: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "resourceType", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 }, "isStatic": false } ], "implementsTokenRanges": [] }, { "kind": "Interface", "canonicalReference": "@loopback/security!Principal:interface", "docComment": "/**\n * Represent a user, an application, or a device\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface Principal " } ], "releaseTag": "Public", "name": "Principal", "members": [ { "kind": "PropertySignature", "canonicalReference": "@loopback/security!Principal#[securityId]:member", "docComment": "/**\n * Name/id\n */\n", "excerptTokens": [ { "kind": "Content", "text": "[" }, { "kind": "Reference", "text": "securityId", "canonicalReference": "@loopback/security!securityId" }, { "kind": "Content", "text": "]: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "[securityId]", "propertyTypeTokenRange": { "startIndex": 3, "endIndex": 4 } }, { "kind": "IndexSignature", "canonicalReference": "@loopback/security!Principal:index(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "[attribute: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": "]: " }, { "kind": "Content", "text": "any" }, { "kind": "Content", "text": ";" } ], "returnTypeTokenRange": { "startIndex": 3, "endIndex": 4 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "attribute", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 2 } } ] } ], "extendsTokenRanges": [] }, { "kind": "Interface", "canonicalReference": "@loopback/security!Role:interface", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "export interface Role extends " }, { "kind": "Reference", "text": "Principal", "canonicalReference": "@loopback/security!Principal:interface" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "Role", "members": [ { "kind": "PropertySignature", "canonicalReference": "@loopback/security!Role#name:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "name: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "name", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 } } ], "extendsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] }, { "kind": "Interface", "canonicalReference": "@loopback/security!Scope:interface", "docComment": "/**\n * oAuth 2.0 scope\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface Scope extends " }, { "kind": "Reference", "text": "Permission", "canonicalReference": "@loopback/security!Permission:class" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "Scope", "members": [ { "kind": "PropertySignature", "canonicalReference": "@loopback/security!Scope#name:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "name: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "name", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 } } ], "extendsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] }, { "kind": "Namespace", "canonicalReference": "@loopback/security!SecurityBindings:namespace", "docComment": "/**\n * Binding keys for security related metadata\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export declare namespace SecurityBindings " } ], "releaseTag": "Public", "name": "SecurityBindings", "members": [ { "kind": "Variable", "canonicalReference": "@loopback/security!SecurityBindings.SUBJECT:var", "docComment": "/**\n * Binding key for subject\n */\n", "excerptTokens": [ { "kind": "Content", "text": "SUBJECT: " }, { "kind": "Reference", "text": "BindingKey", "canonicalReference": "@loopback/context!BindingKey:class" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "Subject", "canonicalReference": "@loopback/security!Subject:interface" }, { "kind": "Content", "text": ">" } ], "releaseTag": "Public", "name": "SUBJECT", "variableTypeTokenRange": { "startIndex": 1, "endIndex": 5 } }, { "kind": "Variable", "canonicalReference": "@loopback/security!SecurityBindings.USER:var", "docComment": "/**\n * Binding key for current user profile\n */\n", "excerptTokens": [ { "kind": "Content", "text": "USER: " }, { "kind": "Reference", "text": "BindingKey", "canonicalReference": "@loopback/context!BindingKey:class" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "UserProfile", "canonicalReference": "@loopback/security!UserProfile:interface" }, { "kind": "Content", "text": ">" } ], "releaseTag": "Public", "name": "USER", "variableTypeTokenRange": { "startIndex": 1, "endIndex": 5 } } ] }, { "kind": "Variable", "canonicalReference": "@loopback/security!securityId:var", "docComment": "/**\n * A symbol for stringified id of security related objects\n */\n", "excerptTokens": [ { "kind": "Content", "text": "securityId: " }, { "kind": "Content", "text": "unique symbol" } ], "releaseTag": "Public", "name": "securityId", "variableTypeTokenRange": { "startIndex": 1, "endIndex": 2 } }, { "kind": "Interface", "canonicalReference": "@loopback/security!Subject:interface", "docComment": "/**\n * `Subject` represents both security state and operations for a single request. It's the `who` for security.\n *\n * Such operations include: - authentication (login) - authorization (access control) - session access - logout\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface Subject " } ], "releaseTag": "Public", "name": "Subject", "members": [ { "kind": "PropertySignature", "canonicalReference": "@loopback/security!Subject#authorities:member", "docComment": "/**\n * An array of authorities granted by the user to the client application. One example is {@link https://tools.ietf.org/html/rfc6749#section-3.3 | oAuth2 scopes).\n */\n", "excerptTokens": [ { "kind": "Content", "text": "authorities: " }, { "kind": "Reference", "text": "Set", "canonicalReference": "!Set:interface" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "Permission", "canonicalReference": "@loopback/security!Permission:class" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "authorities", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 5 } }, { "kind": "PropertySignature", "canonicalReference": "@loopback/security!Subject#credentials:member", "docComment": "/**\n * An array of credentials, such as password, access token, or private/public keys.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "credentials: " }, { "kind": "Reference", "text": "Set", "canonicalReference": "!Set:interface" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "Credential", "canonicalReference": "@loopback/security!Credential:interface" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "credentials", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 5 } }, { "kind": "PropertySignature", "canonicalReference": "@loopback/security!Subject#principals:member", "docComment": "/**\n * An array of principals. It can include information about the current user, the client application, and granted authorities.\n *\n * `Subject` represents both security state and operations for a single application user.\n *\n * Such operations include: - authentication (login) - authorization (access control) - session access - logout\n */\n", "excerptTokens": [ { "kind": "Content", "text": "principals: " }, { "kind": "Reference", "text": "Set", "canonicalReference": "!Set:interface" }, { "kind": "Content", "text": "<" }, { "kind": "Reference", "text": "TypedPrincipal", "canonicalReference": "@loopback/security!TypedPrincipal:class" }, { "kind": "Content", "text": ">" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "principals", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 5 } } ], "extendsTokenRanges": [] }, { "kind": "Interface", "canonicalReference": "@loopback/security!Team:interface", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "export interface Team extends " }, { "kind": "Reference", "text": "Principal", "canonicalReference": "@loopback/security!Principal:interface" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "Team", "members": [], "extendsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] }, { "kind": "Class", "canonicalReference": "@loopback/security!TypedPrincipal:class", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "export declare class TypedPrincipal implements " }, { "kind": "Reference", "text": "Principal", "canonicalReference": "@loopback/security!Principal:interface" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "TypedPrincipal", "members": [ { "kind": "Constructor", "canonicalReference": "@loopback/security!TypedPrincipal:constructor(1)", "docComment": "/**\n * Constructs a new instance of the `TypedPrincipal` class\n */\n", "excerptTokens": [ { "kind": "Content", "text": "constructor(principal: " }, { "kind": "Reference", "text": "Principal", "canonicalReference": "@loopback/security!Principal:interface" }, { "kind": "Content", "text": ", type: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ");" } ], "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { "parameterName": "principal", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 2 } }, { "parameterName": "type", "parameterTypeTokenRange": { "startIndex": 3, "endIndex": 4 } } ] }, { "kind": "Property", "canonicalReference": "@loopback/security!TypedPrincipal#principal:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "readonly principal: " }, { "kind": "Reference", "text": "Principal", "canonicalReference": "@loopback/security!Principal:interface" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "principal", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 }, "isStatic": false }, { "kind": "Property", "canonicalReference": "@loopback/security!TypedPrincipal#type:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "readonly type: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "type", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 }, "isStatic": false } ], "implementsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] }, { "kind": "Interface", "canonicalReference": "@loopback/security!UserProfile:interface", "docComment": "/**\n * The minimum set of attributes that describe a user.\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface UserProfile extends " }, { "kind": "Reference", "text": "Principal", "canonicalReference": "@loopback/security!Principal:interface" }, { "kind": "Content", "text": " " } ], "releaseTag": "Public", "name": "UserProfile", "members": [ { "kind": "PropertySignature", "canonicalReference": "@loopback/security!UserProfile#email:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "email?: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "email", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 } }, { "kind": "PropertySignature", "canonicalReference": "@loopback/security!UserProfile#name:member", "docComment": "", "excerptTokens": [ { "kind": "Content", "text": "name?: " }, { "kind": "Content", "text": "string" }, { "kind": "Content", "text": ";" } ], "releaseTag": "Public", "name": "name", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 } } ], "extendsTokenRanges": [ { "startIndex": 1, "endIndex": 3 } ] } ] } ] }