Updated dependency and made mostly naming changes
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 29s
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 29s
This commit is contained in:
parent
b67f059eda
commit
859aee5939
3 changed files with 15 additions and 14 deletions
|
|
@ -103,7 +103,7 @@ type OAuthAppOptions<T extends BridgemanAccessibleAppClaims> = T & BasicOAuthApp
|
|||
export class OAuthApp<TCustomClaims extends BridgemanAccessibleAppClaims> extends App {
|
||||
private onAuth: OnAuthCallback;
|
||||
private saveSecret: (secret: string) => void | Promise<void>;
|
||||
private getAccessToken: () => Promise<string>;
|
||||
private getSecret: () => Promise<string>;
|
||||
|
||||
private options: OAuthAppOptions<TCustomClaims>;
|
||||
|
||||
|
|
@ -134,6 +134,7 @@ export class OAuthApp<TCustomClaims extends BridgemanAccessibleAppClaims> extend
|
|||
*
|
||||
* @param onAuth The callback to call when a user logs in
|
||||
* @param saveSecret The callback to call to save the secret
|
||||
* @param getSecret The callback to call to get the secret
|
||||
* @param options The options for the OAuth app
|
||||
* @param options.baseAppUrl The base URL of the app
|
||||
* @param options.client_abbreviation The abbreviation of the app (used for user properties associated with the app)
|
||||
|
|
@ -156,13 +157,13 @@ export class OAuthApp<TCustomClaims extends BridgemanAccessibleAppClaims> extend
|
|||
constructor(
|
||||
onAuth: OnAuthCallback,
|
||||
saveSecret: (secret: string) => void | Promise<void>,
|
||||
getAccessToken: () => Promise<string>,
|
||||
getSecret: () => Promise<string>,
|
||||
options?: OAuthAppOptions<TCustomClaims>
|
||||
) {
|
||||
super();
|
||||
this.onAuth = onAuth;
|
||||
this.saveSecret = saveSecret;
|
||||
this.getAccessToken = getAccessToken;
|
||||
this.getSecret = getSecret;
|
||||
this.options = options ?? {} as OAuthAppOptions<TCustomClaims>;
|
||||
}
|
||||
|
||||
|
|
@ -204,7 +205,7 @@ export class OAuthApp<TCustomClaims extends BridgemanAccessibleAppClaims> extend
|
|||
baseAppUrl,
|
||||
this.onAuth,
|
||||
this.saveSecret,
|
||||
this.getAccessToken,
|
||||
this.getSecret,
|
||||
{
|
||||
client_abbreviation: appAbbrv,
|
||||
subscription_required: this.options.subscription_required ?? false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue