public Task ReceiveAsync(AuthenticationTokenReceiveContext context) { var exceptionHandler = Helper.GetOwinScopeService <IOwinExceptionHandler>(context.OwinContext); var refreshTokenHandler = Helper.GetOwinScopeService <IFifthweekRefreshTokenHandler>(context.OwinContext); return(ProviderErrorHandler.CallAndHandleError( () => refreshTokenHandler.ReceiveAsync(context), context.Request, exceptionHandler)); }
public override Task TokenEndpoint(OAuthTokenEndpointContext context) { var exceptionHandler = Helper.GetOwinScopeService <IOwinExceptionHandler>(context.OwinContext); var authorizationServerHandler = Helper.GetOwinScopeService <IFifthweekAuthorizationServerHandler>(context.OwinContext); return(ProviderErrorHandler.CallAndHandleError( () => authorizationServerHandler.TokenEndpointAsync(context), context.Request, exceptionHandler)); }
public override Task GrantRefreshToken(OAuthGrantRefreshTokenContext context) { var exceptionHandler = Helper.GetOwinScopeService <IOwinExceptionHandler>(context.OwinContext); var authorizationServerHandler = Helper.GetOwinScopeService <IFifthweekAuthorizationServerHandler>(context.OwinContext); return(ProviderErrorHandler.CallAndHandleError( () => authorizationServerHandler.GrantRefreshTokenAsync(context), context, exceptionHandler)); }
public override Task ValidateClientAuthentication(OAuthValidateClientAuthenticationContext context) { var exceptionHandler = Helper.GetOwinScopeService <IOwinExceptionHandler>(context.OwinContext); var authorizationServerHandler = Helper.GetOwinScopeService <IFifthweekAuthorizationServerHandler>(context.OwinContext); return(ProviderErrorHandler.CallAndHandleError( () => authorizationServerHandler.ValidateClientAuthenticationAsync(context), context, exceptionHandler)); }