Exemplo n.º 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()
 {
     _clientValidatorFake             = new Mock <IClientValidator>();
     _authorizationCodeStoreFake      = new Mock <IAuthorizationCodeStore>();
     _grantedTokenGeneratorHelperFake = new Mock <IGrantedTokenGeneratorHelper>();
     _tokenStoreFake         = new Mock <ITokenStore>();
     _authenticateClientFake = new Mock <IAuthenticateClient>();
     _clientHelper           = new Mock <IClientHelper>();
     _simpleIdentityServerConfiguratorFake = new Mock <IConfigurationService>();
     _oauthEventSource = new Mock <IOAuthEventSource>();
     _authenticateInstructionGeneratorStub = new Mock <IAuthenticateInstructionGenerator>();
     _grantedTokenHelperStub = new Mock <IGrantedTokenHelper>();
     _jwtGeneratorStub       = new Mock <IJwtGenerator>();
     _getTokenByAuthorizationCodeGrantTypeAction = new GetTokenByAuthorizationCodeGrantTypeAction(
         _clientValidatorFake.Object,
         _authorizationCodeStoreFake.Object,
         _simpleIdentityServerConfiguratorFake.Object,
         _grantedTokenGeneratorHelperFake.Object,
         _authenticateClientFake.Object,
         _clientHelper.Object,
         _oauthEventSource.Object,
         _authenticateInstructionGeneratorStub.Object,
         _tokenStoreFake.Object,
         _grantedTokenHelperStub.Object,
         _jwtGeneratorStub.Object);
 }