@loopback/authorization
Version:
A LoopBack component for authorization support.
42 lines • 1.41 kB
JavaScript
// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
// Node module: @loopback/authorization
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthorizationError = exports.AuthorizationDecision = exports.ANONYMOUS = exports.UNAUTHENTICATED = exports.AUTHENTICATED = exports.EVERYONE = void 0;
/**
* Built-in roles
*/
exports.EVERYONE = '$everyone';
exports.AUTHENTICATED = '$authenticated';
exports.UNAUTHENTICATED = '$unauthenticated';
exports.ANONYMOUS = '$anonymous';
/**
* Decisions for authorization
*/
var AuthorizationDecision;
(function (AuthorizationDecision) {
/**
* Access allowed
*/
AuthorizationDecision["ALLOW"] = "Allow";
/**
* Access denied
*/
AuthorizationDecision["DENY"] = "Deny";
/**
* No decision
*/
AuthorizationDecision["ABSTAIN"] = "Abstain";
})(AuthorizationDecision || (exports.AuthorizationDecision = AuthorizationDecision = {}));
/**
* 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.
*/
class AuthorizationError extends Error {
}
exports.AuthorizationError = AuthorizationError;
//# sourceMappingURL=types.js.map
;