public override Task ValidateTokenRequest(ValidateTokenRequestContext context) { // Only allow resource owner credential flow if (!context.Request.IsPasswordGrantType()) { context.Rejected( error: "unsupported_grant_type", description: "Only resource owner credentials " + "are accepted by this authorization server"); } context.Validated(); return(Task.FromResult <object>(null)); }