jin-frame / providers/security/BearerTokenProvider / BearerTokenProvider
Class: BearerTokenProvider
Defined in: packages/jin-frame/src/providers/security/BearerTokenProvider.ts:9
Bearer Token security provider that implements HTTP Bearer Token authentication. Automatically adds "Bearer " prefix to tokens if not already present.
Implements
Constructors
Constructor
new BearerTokenProvider(
name
):BearerTokenProvider
Defined in: packages/jin-frame/src/providers/security/BearerTokenProvider.ts:20
Creates a new Bearer Token provider
Parameters
name
string
= 'bearer'
Name of this security provider instance
Returns
BearerTokenProvider
Properties
name
readonly
name:string
Defined in: packages/jin-frame/src/providers/security/BearerTokenProvider.ts:14
Name of this security provider instance
Implementation of
type
readonly
type:"http"
Defined in: packages/jin-frame/src/providers/security/BearerTokenProvider.ts:11
Type identifier for this security provider
Implementation of
Methods
createContext()
createContext(
authorization?
,dynamicKey?
):ISecurityContext
Defined in: packages/jin-frame/src/providers/security/BearerTokenProvider.ts:31
Creates security context with Bearer Token authentication
Parameters
authorization?
Authorization data containing the bearer token
dynamicKey?
string
Optional dynamic bearer token that overrides the authorization data
Returns
Security context with Bearer token applied to Authorization header