예제 #1
0
 public TokenActions(
     IGetTokenByResourceOwnerCredentialsGrantTypeAction getTokenByResourceOwnerCredentialsGrantType,
     IGetTokenByAuthorizationCodeGrantTypeAction getTokenByAuthorizationCodeGrantTypeAction,
     IResourceOwnerGrantTypeParameterValidator resourceOwnerGrantTypeParameterValidator,
     IAuthorizationCodeGrantTypeParameterTokenEdpValidator authorizationCodeGrantTypeParameterTokenEdpValidator,
     IRefreshTokenGrantTypeParameterValidator refreshTokenGrantTypeParameterValidator,
     IGetTokenByRefreshTokenGrantTypeAction getTokenByRefreshTokenGrantTypeAction,
     IGetTokenByClientCredentialsGrantTypeAction getTokenByClientCredentialsGrantTypeAction,
     IClientCredentialsGrantTypeParameterValidator clientCredentialsGrantTypeParameterValidator,
     ISimpleIdentityServerEventSource simpleIdentityServerEventSource,
     IRevokeTokenAction revokeTokenAction,
     IEventPublisher eventPublisher,
     IPayloadSerializer payloadSerializer)
 {
     _getTokenByResourceOwnerCredentialsGrantType          = getTokenByResourceOwnerCredentialsGrantType;
     _getTokenByAuthorizationCodeGrantTypeAction           = getTokenByAuthorizationCodeGrantTypeAction;
     _resourceOwnerGrantTypeParameterValidator             = resourceOwnerGrantTypeParameterValidator;
     _authorizationCodeGrantTypeParameterTokenEdpValidator = authorizationCodeGrantTypeParameterTokenEdpValidator;
     _refreshTokenGrantTypeParameterValidator      = refreshTokenGrantTypeParameterValidator;
     _getTokenByRefreshTokenGrantTypeAction        = getTokenByRefreshTokenGrantTypeAction;
     _simpleIdentityServerEventSource              = simpleIdentityServerEventSource;
     _getTokenByClientCredentialsGrantTypeAction   = getTokenByClientCredentialsGrantTypeAction;
     _clientCredentialsGrantTypeParameterValidator = clientCredentialsGrantTypeParameterValidator;
     _revokeTokenAction = revokeTokenAction;
     _eventPublisher    = eventPublisher;
     _payloadSerializer = payloadSerializer;
 }
 private void InitializeFakeObjects()
 {
     _grantedTokenRepositoryFake            = new Mock <IGrantedTokenRepository>();
     _clientHelperFake                      = new Mock <IClientHelper>();
     _simpleIdentityServerEventSourceStub   = new Mock <ISimpleIdentityServerEventSource>();
     _grantedTokenGeneratorHelperStub       = new Mock <IGrantedTokenGeneratorHelper>();
     _getTokenByRefreshTokenGrantTypeAction = new GetTokenByRefreshTokenGrantTypeAction(
         _grantedTokenRepositoryFake.Object,
         _clientHelperFake.Object,
         _simpleIdentityServerEventSourceStub.Object,
         _grantedTokenGeneratorHelperStub.Object);
 }
 private void InitializeFakeObjects()
 {
     _clientHelperFake = new Mock <IClientHelper>();
     _oauthEventSource = new Mock <IOAuthEventSource>();
     _grantedTokenGeneratorHelperStub = new Mock <IGrantedTokenGeneratorHelper>();
     _tokenStoreStub   = new Mock <ITokenStore>();
     _jwtGeneratorStub = new Mock <IJwtGenerator>();
     _authenticateInstructionGeneratorStub = new Mock <IAuthenticateInstructionGenerator>();
     _authenticateClientStub = new Mock <IAuthenticateClient>();
     _getTokenByRefreshTokenGrantTypeAction = new GetTokenByRefreshTokenGrantTypeAction(
         _clientHelperFake.Object,
         _oauthEventSource.Object,
         _grantedTokenGeneratorHelperStub.Object,
         _tokenStoreStub.Object,
         _jwtGeneratorStub.Object,
         _authenticateInstructionGeneratorStub.Object,
         _authenticateClientStub.Object);
 }