public ValidateToken(IClockProvider clockProvider,
                      IEncryptionProvider encryptionProvider,
                      IRequestTokenService requestTokenService)
 {
     _clockProvider       = clockProvider;
     _encryptionProvider  = encryptionProvider;
     _requestTokenService = requestTokenService;
 }
示例#2
0
 public CreateToken(IClockProvider clockProvider,
                    IEncryptionProvider encryptionProvider,
                    IRandomStringGenerator randomStringGenerator,
                    IRequestTokenService requestTokenService)
 {
     _clockProvider         = clockProvider;
     _encryptionProvider    = encryptionProvider;
     _randomStringGenerator = randomStringGenerator;
     _requestTokenService   = requestTokenService;
 }
示例#3
0
        public ValidateTokenValidator(IAccountService accountService,
                                      IEncryptionProvider encryptionProvider,
                                      IRequestTokenService requestTokenService) : base(accountService)
        {
            _encryptionProvider  = encryptionProvider;
            _requestTokenService = requestTokenService;

            RuleFor(member => member.Token)
            .NotEmpty()
            .MustAsync(BeValid)
            .WithMessage(property => string.Format("The token '{0}' can not be found or has expired.", property.Token));
        }
示例#4
0
        public RequestTokenServiceTest()
        {
            _flowHelper = new RequestTokenService(
                new HttpClient(),
                Options.Create(new TokenServiceOptions {
                ConsumerKey    = Environment.GetEnvironmentVariable("Celigo__UnitTests__NetSuite__TBA__ConsumerKey"),
                ConsumerSecret = Environment.GetEnvironmentVariable("Celigo__UnitTests__NetSuite__TBA__ConsumerSecret"),
                CallbackUrl    = "https://localhost:5001/authorize"
            })
                );

            _account = Environment.GetEnvironmentVariable("Celigo__UnitTests__NetSuite__TBA__Account");
        }
示例#5
0
 public TsaLoginController(IAccessTokenService accessTokenService, IRequestTokenService requestTokenService, IRevokeTokenService revokeTokenService)
 {
     _accessTokenService  = accessTokenService;
     _requestTokenService = requestTokenService;
     _revokeTokenService  = revokeTokenService;
 }