public ExampleAuthorizationServer(ICryptoKeyStore cryptoKeyStore,
     ICryptoKeyPair authServerKeys, ICryptoKeyPair dataServerKeys, IOAuth2ClientStore clientStore, IUserStore userStore) {
     this.cryptoKeyStore = cryptoKeyStore;
     this.authServerKeys = authServerKeys;
     this.dataServerKeys = dataServerKeys;
     this.clientStore = clientStore;
     this.userStore = userStore;
 }
Пример #2
0
 public ExampleAuthorizationServer(ICryptoKeyStore cryptoKeyStore,
                                   ICryptoKeyPair authServerKeys, ICryptoKeyPair dataServerKeys, IOAuth2ClientStore clientStore, IUserStore userStore)
 {
     this.cryptoKeyStore = cryptoKeyStore;
     this.authServerKeys = authServerKeys;
     this.dataServerKeys = dataServerKeys;
     this.clientStore    = clientStore;
     this.userStore      = userStore;
 }
Пример #3
0
        private const int TokenLifetimeInSeconds = 24 * 60 * 60; // 24 hours

        public GameApiOAuthServer(ICryptoKeyStore cryptoKeyStore,
                                  ICryptoKeyPair authServerKeys, ICryptoKeyPair dataServerKeys,
                                  IOAuth2ClientStore clientStore, Guid gameProviderId, int tokenLifetimeInSeconds = -1)
        {
            _cryptoKeyStore = cryptoKeyStore;
            _authServerKeys = authServerKeys;
            _dataServerKeys = dataServerKeys;
            _clientStore    = clientStore;
            _gameProviderId = gameProviderId;

            _tokenLifetime = (tokenLifetimeInSeconds >= 0) ? tokenLifetimeInSeconds : TokenLifetimeInSeconds;
        }