UNPKG

@sap/xssec

Version:

XS Advanced Container Security API for node.js

67 lines 2.19 kB
export = SecurityContext; /** * @typedef {import('../service/Service')} Service * @typedef {import('../token/Token')} Token * @typedef {import('../util/Types').SecurityContextConfig} SecurityContextConfig */ /** * @template {Service} S - The type of the service. * @template {Token} T - The type of the token. */ declare class SecurityContext<S extends Service, T extends Token> { /** * Tries to fill up missing properties of the security context configuration from the req object in the configuration. * @param {SecurityContextConfig} contextConfig */ static buildContextConfig(contextConfig: SecurityContextConfig): void; /** * @param {S} service - The service instance. * @param {T} token - The token instance. * @param {SecurityContextConfig} contextConfig - The security context configuration. */ constructor(service: S, token: T, contextConfig: SecurityContextConfig); /** @type {SecurityContextConfig} */ config: SecurityContextConfig; /** * @deprecated Use the constructor to set the Service instance. * @param {S} service */ set service(service: S); /** * The Service instance on which this SecurityContext has been created. * @returns {S} service */ get service(): S; /** * @deprecated Use the constructor to set the Token instance. * @param {T} token */ set token(token: T); /** * The Token instance from which this SecurityContext has ben created. * @returns {T} token */ get token(): T; getAppToken(): string; getEmail(): any; getExpirationDate(): Date; getFamilyName(): any; getGivenName(): any; getGrantType(): any; getLogonName(): any; getUserInfo(): { email: any; familyName: any; givenName: any; logonName: any; }; getTokenInfo(): T; #private; } declare namespace SecurityContext { export { Service, Token, SecurityContextConfig }; } type Service = import("../service/Service"); type Token = import("../token/Token"); type SecurityContextConfig = import("../util/Types").SecurityContextConfig; //# sourceMappingURL=SecurityContext.d.ts.map