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() { _authenticateInstructionGeneratorStub = new Mock <IAuthenticateInstructionGenerator>(); _authenticateClientStub = new Mock <IAuthenticateClient>(); _grantedTokenRepositoryStub = new Mock <ITokenStore>(); _clientRepositoryStub = new Mock <IClientRepository>(); _revokeTokenAction = new RevokeTokenAction( _authenticateInstructionGeneratorStub.Object, _authenticateClientStub.Object, _grantedTokenRepositoryStub.Object, _clientRepositoryStub.Object); }