piral-oidc
Version:
Plugin to integrate authentication using OpenID connect in Piral.
61 lines • 2.12 kB
JavaScript
/**
* The available log levels.
*/
export var LogLevel;
(function (LogLevel) {
/**
* Logging disabled.
*/
LogLevel["none"] = "none";
/**
* Only log on error.
*/
LogLevel["error"] = "error";
/**
* Start logging when its at least a warning.
*/
LogLevel["warn"] = "warn";
/**
* Already start logging on info level.
*/
LogLevel["info"] = "info";
/**
* Log everything - good for debugging purposes.
*/
LogLevel["debug"] = "debug";
})(LogLevel || (LogLevel = {}));
/**
* The available error types.
*/
export var OidcErrorType;
(function (OidcErrorType) {
/**
* This error was thrown at some point during authentication, by the browser or by oidc-client
* and we are unable to handle it.
*/
OidcErrorType["unknown"] = "unknown";
/**
* This error happens when the user does not have an access token during Authentication.
* It is an expected error, and should be handled during `handleAuthentication()` calls.
* If doing manual authentication, prompt the user to `login()` when receiving it.
*/
OidcErrorType["notAuthorized"] = "notAuthorized";
/**
* This error happens when silent renew fails in the background. It is not expected, and
* signifies a network error or configuration problem.
*/
OidcErrorType["silentRenewFailed"] = "silentRenewFailed";
/**
* This is an unexpected error that happens when the `token()` call retrieves a User from
* the user manager, but it does not have an access_token. This signifies a configuration
* error, make sure the correct `scopes` are supplied during configuration.
*/
OidcErrorType["invalidToken"] = "invalidToken";
/**
* This error happened during an Open ID callback. This signifies a network or configuration error
* which is non-recoverable. This should be logged to a logging service, and the user should be
* prompted to logout().
*/
OidcErrorType["oidcCallback"] = "oidcCallback";
})(OidcErrorType || (OidcErrorType = {}));
//# sourceMappingURL=types.js.map