コード例 #1
0
 public PlexMembershipProvider()
 {
     _userService       = EngineContext.Current.Resolve <IUserService>();
     _oauthService      = EngineContext.Current.Resolve <IOAuthService>();
     _oauthTokenService = EngineContext.Current.Resolve <IOAuthTokenService>();
     _membershipService = EngineContext.Current.Resolve <IMembershipService>();
 }
コード例 #2
0
 public PlexMembershipProvider(IUserService userService, IOAuthService oauthService, IOAuthTokenService oauthTokenService, IMembershipService membershipService)
 {
     _userService       = userService;
     _oauthService      = oauthService;
     _oauthTokenService = oauthTokenService;
     _membershipService = membershipService;
 }
コード例 #3
0
        public CachingOAuthTokenServiceDecorator(IOAuthTokenService oAuthTokenService)
        {
            if (oAuthTokenService == null)
            {
                throw new ArgumentNullException("oAuthTokenService");
            }

            _oAuthTokenService = oAuthTokenService;
        }
コード例 #4
0
 internal OAuthServicesContext(IOAuthUserService userService,
                               IOAuthClientStore clientStore,
                               IOAuthRefreshTokenStore refreshTokenStore,
                               IOAuthTokenService tokenService)
 {
     UserService       = userService;
     ClientStore       = clientStore;
     RefreshTokenStore = refreshTokenStore;
     TokenService      = tokenService;
 }
コード例 #5
0
        public ReliableOAuthTokenServiceDecorator(IOAuthTokenService oAuthTokenService)
        {
            if (oAuthTokenService == null)
            {
                throw new ArgumentNullException("oAuthTokenService");
            }

            _oAuthTokenService    = oAuthTokenService;
            _circuitBreakerPolicy = CreateCircuitBreakerPolicy();
            _retryPolicy          = CreateWaitAndRetryPolicy();
        }
コード例 #6
0
 public PrivilegedAccessQueryHandler(ISecretRepository secretRepository,
                                     ITotpService totpService,
                                     IOAuthTokenService tokenService,
                                     ICacheProvider cacheProvider,
                                     ILogger logger)
 {
     _secretRepository = secretRepository;
     _totpService      = totpService;
     _tokenService     = tokenService;
     _cacheProvider    = cacheProvider;
     _logger           = logger;
 }
コード例 #7
0
        static HomeController()
        {
            // This stuff should come from config and get set up
            // as part of the app start-up (IoC config, etc...)

            _httpClientGovernor = new HttpClientGovernor();
            var clientId      = @"362b88659454lt0g8b3ontlr7e";
            var clientSecret  = @""; // Ask me for this.
            var scope         = @"Default/STS";
            var tokenEndpoint = @"https://95be0fd7-c5a6-4581-967e-27a82f7abdc1.auth.us-east-1.amazoncognito.com/oauth2/token";

            _oAuthTokenService = new CachingOAuthTokenServiceDecorator(
                new ReliableOAuthTokenServiceDecorator(
                    new OAuthTokenService(_httpClientGovernor, clientId, clientSecret, scope, tokenEndpoint)));
        }
 public HmrcAuthTokenBroker(
     [RequiredPolicy(HmrcExecutionPolicy.Name)] ExecutionPolicy executionPolicy,
     ILogger logger,
     IOAuthTokenService tokenService,
     ISecretRepository secretRepository,
     ITotpService totpService,
     ITokenRefresher tokenRefresher,
     IHmrcAuthTokenBrokerConfig hmrcAuthTokenBrokerConfig)
 {
     _secretRepository          = secretRepository;
     _totpService               = totpService;
     _tokenService              = tokenService;
     _logger                    = logger;
     _executionPolicy           = executionPolicy;
     _tokenRefresher            = tokenRefresher;
     _hmrcAuthTokenBrokerConfig = hmrcAuthTokenBrokerConfig;
     _initialiseTask            = InitialiseToken();
 }
コード例 #9
0
ファイル: TokenService.cs プロジェクト: simenhagelid/Fint.Sse
 public TokenService(IOAuthTokenService tokenClient)
 {
     _tokenClient = tokenClient;
 }