import { AuthorizationServerOptions } from "../../authorization_server" ; import { AuthorizationRequest } from "../../requests/authorization.request" ; import { RequestInterface } from "../../requests/request" ; import { ResponseInterface } from "../../responses/response" ; import { DateInterval } from "../../utils/date_interval" ; export type GrantIdentifier = "authorization_code" | "client_credentials" | "refresh_token" | "password" | "implicit" ; export interface GrantInterface { options : AuthorizationServerOptions ; identifier : GrantIdentifier ; canRespondToAccessTokenRequest ( request ) : boolean ; respondToAccessTokenRequest ( request , accessTokenTTL ) : Promise < ResponseInterface > ; canRespondToAuthorizationRequest ( request ) : boolean ; validateAuthorizationRequest ( request ) : Promise < AuthorizationRequest > ; completeAuthorizationRequest ( authorizationRequest ) : Promise < ResponseInterface > ; }