Skip to main content

FileTokenSource

@webda/oidc


Class: FileTokenSource

Defined in: packages/oidc/src/sources/file.ts:11

Token from a file, like a Kubernetes projected service account token

The file is read again on every refresh: the kubelet rotates it. Its audience is fixed by the pod spec.

Implements​

Constructors​

Constructor​

new FileTokenSource(path): FileTokenSource

Defined in: packages/oidc/src/sources/file.ts:15

Parameters​

path​

string

the token file

Returns​

FileTokenSource

Properties​

path​

protected path: string

Defined in: packages/oidc/src/sources/file.ts:15

the token file

Methods​

getToken()​

getToken(audience): Promise<SourcedToken>

Defined in: packages/oidc/src/sources/file.ts:20

Parameters​

audience​

string

Returns​

Promise<SourcedToken>

Implementation of​

TokenSource.getToken