Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ declare namespace OAuth2Server {
* Validate requested scope. Calls Model#validateScope() if implemented.
*
*/
validateScope(user: User, client: Client, scope: string[]): Promise<string[] | Falsey>;
validateScope(user: User, client: Client, scope?: string[]): Promise<string[] | Falsey>;

/**
* Retrieve info from the request and client and return token
Expand Down Expand Up @@ -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<string[] | Falsey>;
validateScope?(user: User, client: Client, scope?: string[]): Promise<string[] | Falsey>;

/**
* Invoked to check if the provided `redirectUri` is valid for a particular `client`.
Expand All @@ -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<string[] | Falsey>;
validateScope?(user: User, client: Client, scope?: string[]): Promise<string[] | Falsey>;
}

interface RefreshTokenModel extends BaseModel, RequestAuthenticationModel {
Expand Down Expand Up @@ -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<string[] | Falsey>;
validateScope?(user: User, client: Client, scope?: string[]): Promise<string[] | Falsey>;
}

interface ExtensionModel extends BaseModel, RequestAuthenticationModel {}
Expand Down