Skip to content

Commit

Permalink
types: marked verifyScope function as optional #209 fix #202
Browse files Browse the repository at this point in the history
Merge pull request #209 from shrihari-prakash/verify-scope-fix thanks to @shrihari-prakash
  • Loading branch information
jankapunkt authored Aug 4, 2023
2 parents 4b0459e + 1718df3 commit e29410b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,10 @@ declare namespace OAuth2Server {

/**
* Invoked during request authentication to check if the provided access token was authorized the requested scopes.
* Optional, if a custom authenticateHandler is used or if there is no scope part of the request.
*
*/
verifyScope(token: Token, scope: string | string[], callback?: Callback<boolean>): Promise<boolean>;
verifyScope?(token: Token, scope: string | string[], callback?: Callback<boolean>): Promise<boolean>;
}

interface AuthorizationCodeModel extends BaseModel, RequestAuthenticationModel {
Expand Down

0 comments on commit e29410b

Please sign in to comment.