diff --git a/index.d.ts b/index.d.ts index 5cd73d9..6bc4169 100644 --- a/index.d.ts +++ b/index.d.ts @@ -148,7 +148,7 @@ declare namespace OAuth2Server { * Validate requested scope. Calls Model#validateScope() if implemented. * */ - validateScope(user: User, client: Client, scope: string[]): Promise; + validateScope(user: User, client: Client, scope?: string[]): Promise; /** * Retrieve info from the request and client and return token @@ -314,7 +314,7 @@ declare namespace OAuth2Server { * Invoked to check if the requested scope is valid for a particular client/user combination. * */ - validateScope?(user: User, client: Client, scope: string[]): Promise; + validateScope?(user: User, client: Client, scope?: string[]): Promise; /** * Invoked to check if the provided `redirectUri` is valid for a particular `client`. @@ -340,7 +340,7 @@ declare namespace OAuth2Server { * Invoked to check if the requested scope is valid for a particular client/user combination. * */ - validateScope?(user: User, client: Client, scope: string[]): Promise; + validateScope?(user: User, client: Client, scope?: string[]): Promise; } interface RefreshTokenModel extends BaseModel, RequestAuthenticationModel { @@ -374,7 +374,7 @@ declare namespace OAuth2Server { * Invoked to check if the requested scope is valid for a particular client/user combination. * */ - validateScope?(user: User, client: Client, scope: string[]): Promise; + validateScope?(user: User, client: Client, scope?: string[]): Promise; } interface ExtensionModel extends BaseModel, RequestAuthenticationModel {}