This commit is contained in:
parent
aa81a66556
commit
50d9fa3cd1
1 changed files with 115 additions and 3 deletions
|
|
@ -108,6 +108,11 @@ export interface ClientCredentialsProviderOptions {
|
|||
* Optional client name for metadata.
|
||||
*/
|
||||
clientName?: string;
|
||||
|
||||
/**
|
||||
* Space-separated scopes values requested by the client.
|
||||
*/
|
||||
scope?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -140,7 +145,8 @@ export class ClientCredentialsProvider implements OAuthClientProvider {
|
|||
client_name: options.clientName ?? 'client-credentials-client',
|
||||
redirect_uris: [],
|
||||
grant_types: ['client_credentials'],
|
||||
token_endpoint_auth_method: 'client_secret_basic'
|
||||
token_endpoint_auth_method: 'client_secret_basic',
|
||||
scope: options.scope
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -216,6 +222,11 @@ export interface PrivateKeyJwtProviderOptions {
|
|||
* Optional JWT lifetime in seconds (default: 300).
|
||||
*/
|
||||
jwtLifetimeSeconds?: number;
|
||||
|
||||
/**
|
||||
* Space-separated scopes values requested by the client.
|
||||
*/
|
||||
scope?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -249,7 +260,8 @@ export class PrivateKeyJwtProvider implements OAuthClientProvider {
|
|||
client_name: options.clientName ?? 'private-key-jwt-client',
|
||||
redirect_uris: [],
|
||||
grant_types: ['client_credentials'],
|
||||
token_endpoint_auth_method: 'private_key_jwt'
|
||||
token_endpoint_auth_method: 'private_key_jwt',
|
||||
scope: options.scope
|
||||
};
|
||||
this.addClientAuthentication = createPrivateKeyJwtAuth({
|
||||
issuer: options.clientId,
|
||||
|
|
@ -324,6 +336,11 @@ export interface StaticPrivateKeyJwtProviderOptions {
|
|||
* Optional client name for metadata.
|
||||
*/
|
||||
clientName?: string;
|
||||
|
||||
/**
|
||||
* Space-separated scopes values requested by the client.
|
||||
*/
|
||||
scope?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -347,7 +364,8 @@ export class StaticPrivateKeyJwtProvider implements OAuthClientProvider {
|
|||
client_name: options.clientName ?? 'static-private-key-jwt-client',
|
||||
redirect_uris: [],
|
||||
grant_types: ['client_credentials'],
|
||||
token_endpoint_auth_method: 'private_key_jwt'
|
||||
token_endpoint_auth_method: 'private_key_jwt',
|
||||
scope: options.scope
|
||||
};
|
||||
|
||||
const assertion = options.jwtBearerAssertion;
|
||||
|
|
|
|||
Loading…
Reference in a new issue