UNPKG

@sap/xssec

Version:

XS Advanced Container Security API for node.js

65 lines 2.09 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; /** * @param {S} service */ set service(service: S); /** * The Service instance on which this SecurityContext has been created. * @returns {S} service */ get service(): S; /** * @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(): string; getExpirationDate(): Date; getFamilyName(): string; getGivenName(): string; getGrantType(): string; getLogonName(): string; getUserInfo(): { email: string; familyName: string; givenName: string; logonName: string; }; 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