diff --git a/src/oauth/OAuthApp.ts b/src/oauth/OAuthApp.ts index 6310a6f..f942084 100644 --- a/src/oauth/OAuthApp.ts +++ b/src/oauth/OAuthApp.ts @@ -105,23 +105,6 @@ export class OAuthApp extend private saveSecret: (secret: string) => void | Promise; private options: OAuthAppOptions; - /*private baseAppUrl?: URL; - private appAbbrv?: string; - private appName?: string | { [language: string]: string }; - private contacts?: string[]; - private scopes?: Scopes[]; - private vault_type?: "azure" | "hashicorp" | "file"; - private auth_default_method?: "query" | "form_post" | "PAR"; - private auth_default_use_JWT?: boolean; - private auth_default_response_mode?: 'query' | 'fragment' | 'form_post'; - private client_secret?: string; - private logo_url?: URL; - private tos_url?: URL; - private policy_url?: URL; - private webhooks?: Webhook[]; - private subscriptionRequired?: boolean; - private subscriptionTiers?: AppSubscriptionTier[]; - private addons?: Addon[];*/ private client: Client; @@ -152,7 +135,7 @@ export class OAuthApp extend * @param saveSecret The callback to call to save the secret * @param options The options for the OAuth app * @param options.baseAppUrl The base URL of the app - * @param options.appAbbrv The abbreviation of the app (used for user properties associated with the app) + * @param options.client_abbreviation The abbreviation of the app (used for user properties associated with the app) * @param options.appName The name of the app * @param options.contacts The email addresses of the contacts for the app * @param options.scopes The scopes an app token COULD ask for (token scopes would have to ask for this or a subset of this list) @@ -165,8 +148,8 @@ export class OAuthApp extend * @param options.tos_url The URL of the app's terms of service * @param options.policy_url The URL of the app's privacy policy * @param options.webhooks The webhooks supported by the app - * @param options.subscriptionRequired If a subscription is required - * @param options.subscriptionTiers The subscription tiers available for the app + * @param options.subscription_required If a subscription is required + * @param options.subscription_tiers The subscription tiers available for the app * @param options.addons Addons offered by the app */ constructor( @@ -178,26 +161,6 @@ export class OAuthApp extend this.onAuth = onAuth; this.saveSecret = saveSecret; this.options = options ?? {} as OAuthAppOptions; - - /*if(typeof options !== 'undefined') { - this.baseAppUrl = options.baseAppUrl; - this.appAbbrv = options.appAbbrv; - this.appName = options.appName; - this.contacts = options.contacts; - this.scopes = options.scopes; - this.vault_type = options.vault_type; - this.auth_default_method = options.auth_default_method; - this.auth_default_use_JWT = options.auth_default_use_JWT; - this.auth_default_response_mode = options.auth_default_response_mode; - this.client_secret = options.client_secret; - this.logo_url = options.logo_url; - this.tos_url = options.tos_url; - this.policy_url = options.policy_url; - this.webhooks = options.webhooks; - this.subscriptionRequired = options.subscriptionRequired; - this.subscriptionTiers = options.subscriptionTiers; - this.addons = options.addons; - }*/ } /** Returns the OAuthApp's Client instance (which is useful for managing keys, creating resource request, etc...) */ @@ -240,8 +203,8 @@ export class OAuthApp extend this.saveSecret, { client_abbreviation: appAbbrv, - subscription_required: this.options.subscriptionRequired ?? false, - subscription_tiers: this.options.subscriptionTiers, + subscription_required: this.options.subscription_required ?? false, + subscription_tiers: this.options.subscription_tiers, addons: this.options.addons, webhooks: this.options.webhooks } as TCustomClaims, diff --git a/src/oauth/types/BridgemanAccessibleAppClaims.ts b/src/oauth/types/BridgemanAccessibleAppClaims.ts index d04ad5c..37bb4ca 100644 --- a/src/oauth/types/BridgemanAccessibleAppClaims.ts +++ b/src/oauth/types/BridgemanAccessibleAppClaims.ts @@ -27,7 +27,7 @@ export interface BridgemanAccessibleAppClaims extends ClientCustomClaims { * If we want to store some kind of ID for it, the property in the user might be `aepId`. * And all apps would follow this pattern of ``. */ - client_abbreviation: string; + client_abbreviation?: string; /** The webhooks registered for this app */ webhooks?: Webhook[];