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));
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }