Exemplo n.º 1
0
 internal AntiForgeryWorker(IAntiForgeryTokenSerializer serializer, IAntiForgeryConfig config, ITokenStore tokenStore, ITokenValidator validator)
 {
     _serializer = serializer;
     _config = config;
     _tokenStore = tokenStore;
     _validator = validator;
 }
Exemplo n.º 2
0
 protected TokenStoreAuthenticator(string baseUri, string tokenUri, string callBackUri, ITokenStore store)
 {
     _tokenUri = tokenUri;
     CallBackUri = callBackUri;
     BaseUri = baseUri;
     Store = store;                      
 }
        private void ITokenStoreTest(ITokenStore tokenStore, string url, string token, DateTimeOffset expires)
        {
            try
            {
                TargetUri uri = new TargetUri(url);

                Token writeToken = new Token(token, TokenType.Test);
                Token readToken = null;

                tokenStore.WriteToken(uri, writeToken);

                if ((readToken = tokenStore.ReadToken(uri)) != null)
                {
                    Assert.AreEqual(writeToken.Value, readToken.Value, "Token values did not match between written and read");
                    Assert.AreEqual(writeToken.Type, readToken.Type, "Token types did not mathc between written and read");
                }
                else
                {
                    Assert.Fail("Failed to read token");
                }

                tokenStore.DeleteToken(uri);

                Assert.IsNull(readToken = tokenStore.ReadToken(uri), "Deleted token was read back");
            }
            catch (Exception exception)
            {
                Assert.Fail(exception.Message);
            }
        }
Exemplo n.º 4
0
 public PartnerAuthenticator(string baseUri, string tokenUri, string authorizeUri, string callBackUri, ITokenStore store, string signingCertificatePath, string certificatePath, string password)
     : this(baseUri, tokenUri, authorizeUri, callBackUri, store)
 {
     _signingCertificate = new X509Certificate2(signingCertificatePath, password);
     _certificate = new X509Certificate2(certificatePath, password);
     ServicePointManager.ServerCertificateValidationCallback += RemoteCertificateValidationCallback;
 }
 protected TokenStoreAuthenticator(string baseUri, string tokenUri, string callBackUri, ITokenStore store)
 {
     CallBackUri = callBackUri;
     BaseUri = baseUri;
     Store = store;
     Tokens = new OAuthTokens(baseUri, tokenUri);            
 }
 public PublicMvcAuthenticator(string baseUri, string tokenUri, string callBackUrl,
     ITokenStore store, IConsumer consumer, ITokenStore requestTokenStore)
     : base(baseUri, tokenUri, callBackUrl, store)
 {
     _consumer = consumer;
     _requestTokenStore = requestTokenStore;
 }
Exemplo n.º 7
0
        public OAuthProvider(ITokenStore tokenStore, params IContextInspector[] inspectors)
        {
            if (tokenStore == null) throw new ArgumentNullException("tokenStore");
            _tokenStore = tokenStore;

            if (inspectors != null) _inspectors.AddRange(inspectors);
        }
 /// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 internal VstsAadAuthentication(
     ICredentialStore personalAccessTokenStore,
     ITokenStore vstsIdeTokenCache,
     IVstsAuthority vstsAuthority)
     : base(personalAccessTokenStore,
            vstsIdeTokenCache,
            vstsAuthority)
 { }
Exemplo n.º 9
0
 public PartnerMvcAuthenticator(string baseUri, string authorizeUri, string callBackUri, 
     ITokenStore store, string signingCertificatePath, string certificatePath, string entrustPassword,
     IConsumer consumer, ITokenStore requestTokenStore, string signingCertPassword)
     : this(baseUri, authorizeUri, callBackUri, store, consumer, requestTokenStore)
 {
     _signingCertificate = new X509Certificate2(signingCertificatePath, signingCertPassword, X509KeyStorageFlags.MachineKeySet);
     _certificate = new X509Certificate2(certificatePath, entrustPassword);            
 }
 public PartnerMvcAuthenticator(string baseUri, string authorizeUri, string callBackUri, 
     ITokenStore store, string signingCertificatePath, string certificatePath, string password,
     IConsumer consumer, ITokenStore requestTokenStore)
     : this(baseUri, authorizeUri, callBackUri, store, consumer, requestTokenStore)
 {
     _signingCertificate = new X509Certificate2(signingCertificatePath);
     _certificate = new X509Certificate2(certificatePath, password);
 }
 public PartnerMvcAuthenticator(string baseUri, string authorizeUri, string callBackUri, 
     ITokenStore store, X509Certificate2 signingCertificate, X509Certificate2 certificate,
     IConsumer consumer, ITokenStore requestTokenStore)
     : this(baseUri, authorizeUri, callBackUri, store, consumer, requestTokenStore)
 {
     _signingCertificate = signingCertificate;
     _certificate = certificate;
 }
 /// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 /// <param name="personalAccessTokenStore"></param>
 /// <param name="adaRefreshTokenStore"></param>
 /// <param name="vstsIdeTokenCache"></param>
 /// <param name="liveAuthority"></param>
 internal VstsMsaAuthentication(
     ICredentialStore personalAccessTokenStore,
     ITokenStore adaRefreshTokenStore,
     ITokenStore vstsIdeTokenCache,
     IVstsAuthority liveAuthority)
     : base(personalAccessTokenStore,
            adaRefreshTokenStore,
            vstsIdeTokenCache,
            liveAuthority)
 { }
 /// <summary>
 /// Invoked by a derived classes implementation. Allows custom back-end implementations to be used.
 /// </summary>
 /// <param name="tokenScope">The desired scope of the acquired personal access token(s).</param>
 /// <param name="personalAccessTokenStore">The secret store for acquired personal access token(s).</param>
 /// <param name="adaRefreshTokenStore">The secret store for acquired Azure refresh token(s).</param>
 protected BaseVsoAuthentication(
     VsoTokenScope tokenScope,
     ICredentialStore personalAccessTokenStore,
     ITokenStore adaRefreshTokenStore = null)
     : this(tokenScope, personalAccessTokenStore)
 {
     this.AdaRefreshTokenStore = adaRefreshTokenStore ?? this.AdaRefreshTokenStore;
     this.VsoAdalTokenCache = new VsoAdalTokenCache();
     this.VsoIdeTokenCache = new TokenRegistry();
 }
 /// <summary>
 /// Test constructor which allows for using fake credential stores
 /// </summary>
 internal VsoAadAuthentication(
     ICredentialStore personalAccessTokenStore,
     ITokenStore adaRefreshTokenStore,
     ITokenStore vsoIdeTokenCache,
     IVsoAuthority vsoAuthority)
     : base(personalAccessTokenStore,
            adaRefreshTokenStore,
            vsoIdeTokenCache,
            vsoAuthority)
 { }
 public VstsMsaAuthentication(
     VstsTokenScope tokenScope,
     ICredentialStore personalAccessTokenStore,
     ITokenStore adaRefreshTokenStore = null)
     : base(tokenScope,
            personalAccessTokenStore,
            adaRefreshTokenStore)
 {
     this.VstsAuthority = new VstsAzureAuthority(DefaultAuthorityHost);
 }
        /// <summary>
        /// Creates a new <see cref="SecretStore"/> backed by the operating system keychain /
        /// secrets vault.
        /// </summary>
        /// <param name="namespace">The namespace of the secrets written and read by this store.</param>
        /// <param name="credentialCache">
        /// (optional) Write-through, read-first cache. Default cache is used if a custom cache is
        /// not provided.
        /// </param>
        /// <param name="tokenCache">
        /// (optional) Write-through, read-first cache. Default cache is used if a custom cache is
        /// not provided.
        /// </param>
        public SecretStore(string @namespace, ICredentialStore credentialCache = null, ITokenStore tokenCache = null, Secret.UriNameConversion getTargetName = null)
        {
            if (String.IsNullOrWhiteSpace(@namespace) || @namespace.IndexOfAny(IllegalCharacters) != -1)
                throw new ArgumentNullException("prefix", "The `prefix` parameter is null or invalid.");

            _getTargetName = getTargetName ?? Secret.UriToSimpleName;

            _namespace = @namespace;
            _credentialCache = credentialCache ?? new SecretCache(@namespace, _getTargetName);
            _tokenCache = tokenCache ?? new SecretCache(@namespace, _getTargetName);
        }
Exemplo n.º 17
0
 internal AntiForgeryWorker([NotNull] IAntiForgeryTokenSerializer serializer,
                            [NotNull] AntiForgeryOptions config,
                            [NotNull] ITokenStore tokenStore,
                            [NotNull] ITokenGenerator generator,
                            [NotNull] ITokenValidator validator)
 {
     _serializer = serializer;
     _config = config;
     _tokenStore = tokenStore;
     _generator = generator;
     _validator = validator;
 }
Exemplo n.º 18
0
        public OController()
        {
            oAuthContextBuilder = new OAuthContextBuilder();
             tr = new MVC.Sample.Models.TokenRepository();
             tokenstore = new MVC.Sample.Models.SampleMemoryTokenStore(tr);

             iCStore = new SampleConsumerStore();

             Inspector = new ConsumerValidationInspector(iCStore);

             oAuthProvider = new OAuthProvider(tokenstore, Inspector);
             target = new OAuthController(oAuthContextBuilder, oAuthProvider);
        }
        /// <summary>
        /// Creates a new <see cref="SecretStore"/> backed by the operating system keychain /
        /// secrets vault.
        /// </summary>
        /// <param name="namespace">The namespace of the secrets written and read by this store.</param>
        /// <param name="credentialCache">
        /// (optional) Write-through, read-first cache. Default cache is used if a custom cache is
        /// not provided.
        /// </param>
        /// <param name="tokenCache">
        /// (optional) Write-through, read-first cache. Default cache is used if a custom cache is
        /// not provided.
        /// </param>
        public SecretStore(string @namespace, ICredentialStore credentialCache = null, ITokenStore tokenCache = null, Secret.UriNameConversion getTargetName = null)
        {
            if (String.IsNullOrWhiteSpace(@namespace))
                throw new ArgumentNullException(nameof(@namespace));
            if (@namespace.IndexOfAny(IllegalCharacters) != -1)
                throw new ArgumentException(nameof(@namespace));

            _getTargetName = getTargetName ?? Secret.UriToName;

            _namespace = @namespace;
            _credentialCache = credentialCache ?? new SecretCache(@namespace, _getTargetName);
            _tokenCache = tokenCache ?? new SecretCache(@namespace, _getTargetName);
        }
Exemplo n.º 20
0
 public AustralianPayroll(ITokenStore store, IUser user) :
     base(ApplicationSettings.Uri,
         new PublicAuthenticator(
             ApplicationSettings.Uri,
             ApplicationSettings.Uri,
             ApplicationSettings.CallBackUri,
             store),
         new Consumer(
             ApplicationSettings.Key,
             ApplicationSettings.Secret),
         user,
         Mapper,
         Mapper)
 {
 }
        internal BaseVstsAuthentication(
            ICredentialStore personalAccessTokenStore,
            ITokenStore vstsIdeTokenCache,
            IVstsAuthority vstsAuthority)
            : this(VstsTokenScope.ProfileRead, personalAccessTokenStore)
        {
            if (ReferenceEquals(vstsIdeTokenCache, null))
                throw new ArgumentNullException(nameof(vstsIdeTokenCache));
            if (ReferenceEquals(vstsAuthority, null))
                throw new ArgumentNullException(nameof(vstsAuthority));

            this.VstsIdeTokenCache = vstsIdeTokenCache;
            this.VstsAuthority = vstsAuthority;
            this.VstsAdalTokenCache = TokenCache.DefaultShared;
        }
Exemplo n.º 22
0
 public AmericanPayroll(ITokenStore store, IUser user, bool includeRateLimiter = false) :
     base(ApplicationSettings.Uri,
         new PublicAuthenticator(
             ApplicationSettings.Uri,
             ApplicationSettings.Uri,
             ApplicationSettings.CallBackUri,
             store),
         new Consumer(
             ApplicationSettings.Key,
             ApplicationSettings.Secret),
         user,
         Mapper,
         Mapper,
         includeRateLimiter ? new RateLimiter() : null)
 {
 }
        internal BaseVsoAuthentication(
            ICredentialStore personalAccessTokenStore,
            ITokenStore adaRefreshTokenStore,
            ITokenStore vsoIdeTokenCache,
            IVsoAuthority vsoAuthority)
            : this(VsoTokenScope.ProfileRead, personalAccessTokenStore)
        {
            Debug.Assert(adaRefreshTokenStore != null, "The adaRefreshTokenStore paramter is null or invalid.");
            Debug.Assert(vsoIdeTokenCache != null, "The vsoIdeTokenCache paramter is null or invalid.");
            Debug.Assert(vsoAuthority != null, "The vsoAuthority paramter is null or invalid.");

            this.AdaRefreshTokenStore = adaRefreshTokenStore;
            this.VsoIdeTokenCache = vsoIdeTokenCache;
            this.VsoAuthority = vsoAuthority;
            this.VsoAdalTokenCache = TokenCache.DefaultShared;
        }
        /// <summary>
        /// Creates a new <see cref="SecretStore"/> backed by the operating system keychain /
        /// secrets vault.
        /// </summary>
        /// <param name="storeNamespace">The namespace of the secrets written and read by this store.</param>
        /// <param name="credentialCache">
        /// (optional) Write-through, read-first cache. Default cache is used if a custom cache is
        /// not provided.
        /// </param>
        /// <param name="tokenCache">
        /// (optional) Write-through, read-first cache. Default cache is used if a custom cache is
        /// not provided.
        /// </param>
        /// <exception cref="ArgumentOutOfRangeException"><paramref name="storeNamespace"/> has <see cref="BaseSecureStore.IllegalCharacters"/></exception>
        public SecretStore(string storeNamespace, ITokenStore tokenCache = null, Secret.UriNameConversion getTargetName = null)
        {
            if (String.IsNullOrWhiteSpace(storeNamespace))
            {
                throw new ArgumentNullException(nameof(storeNamespace));
            }
            if (storeNamespace.IndexOfAny(IllegalCharacters) != -1)
            {
                throw new ArgumentOutOfRangeException(nameof(storeNamespace));
            }

            _getTargetName = getTargetName ?? Secret.UriToName;

            _namespace = storeNamespace;
            _tokenCache = tokenCache ?? new SecretCache(storeNamespace, _getTargetName);
        }
Exemplo n.º 25
0
 public AustralianPayroll(ITokenStore store, IUser user) :
     base(ApplicationSettings.Uri,
         new PartnerAuthenticator(
             ApplicationSettings.Uri,
             ApplicationSettings.AuthorizeUri,
             ApplicationSettings.CallBackUri,
             store,
             ApplicationSettings.SigningCertificatePath,
             ApplicationSettings.ParterCertificatePath,
             ApplicationSettings.ParterCertificatePassword),
         new Consumer(
             ApplicationSettings.Key,
             ApplicationSettings.Secret),
         user,
         Mapper,
         Mapper)
 {
 }
Exemplo n.º 26
0
        public OAuthHandler(IAuthenticator auth,
		                     ITokenRepository<AccessToken> access_token_repo,
		                     ITokenRepository<RequestToken> request_token_repo,
		                     ITokenStore token_store)
        {
            this.Authenticator = auth;
            this.AccessTokens = access_token_repo;
            this.RequestTokens = request_token_repo;
            this.TokenStore = token_store;

            this.ConsumerStore = new RainyConsumerStore ();
            //this.NonceStore = new DummyNonceStore ();
            // initialize those classes that are not persisted
            // TODO request tokens should be persisted in the future
            //RequestTokens = new SimpleTokenRepository<RequestToken> ();

            SetupInspectors ();
        }
Exemplo n.º 27
0
 public AmericanPayroll(ITokenStore store, IUser user, bool includeRateLimiter = false)
     : base(ApplicationSettings.Uri,
         new PartnerAuthenticator(
             ApplicationSettings.Uri,
             ApplicationSettings.AuthorizeUri,
             ApplicationSettings.CallBackUri,
             store,
             ApplicationSettings.SigningCertificatePath,
             ApplicationSettings.ParterCertificatePath,
             ApplicationSettings.ParterCertificatePassword),
         new Consumer(
             ApplicationSettings.Key,
             ApplicationSettings.Secret),
         user,
         Mapper,
         Mapper,
         includeRateLimiter ? new RateLimiter() : null)
 {
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="tenantId">
 /// <para>The unique identifier for the responsible Azure tenant.</para>
 /// <para>Use <see cref="BaseVsoAuthentication.GetAuthentication"/>
 /// to detect the tenant identity and create the authentication object.</para>
 /// </param>
 /// <param name="tokenScope">The scope of all access tokens acquired by the authority.</param>
 /// <param name="personalAccessTokenStore">The secure secret store for storing any personal 
 /// access tokens acquired.</param>
 /// <param name="adaRefreshTokenStore">The secure secret store for storing any Azure tokens 
 /// acquired.</param>
 public VsoAadAuthentication(
     Guid tenantId,
     VsoTokenScope tokenScope,
     ICredentialStore personalAccessTokenStore,
     ITokenStore adaRefreshTokenStore = null)
     : base(tokenScope,
            personalAccessTokenStore,
            adaRefreshTokenStore)
 {
     if (tenantId == Guid.Empty)
     {
         this.VsoAuthority = new VsoAzureAuthority(AzureAuthority.DefaultAuthorityHostUrl);
     }
     else
     {
         // create an authority host url in the format of https://login.microsoft.com/12345678-9ABC-DEF0-1234-56789ABCDEF0
         string authorityHost = AzureAuthority.GetAuthorityUrl(tenantId);
         this.VsoAuthority = new VsoAzureAuthority(authorityHost);
     }
 }
Exemplo n.º 29
0
 public XeroCoreApi(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, ITokenStore tokenStore)
     : this(baseUri, auth, consumer, user, null, tokenStore)
 {
 }
Exemplo n.º 30
0
        protected virtual void Configure(ConfigSource config)
        {
            tokenStore = (ITokenStore)ConfigureComponent(config.GetChild("tokenStore"), typeof(ITokenStore), typeof(HeapTokenStore));
            callbackStore = (ICallbackStore)ConfigureComponent(config.GetChild("callbackStore"), typeof(ICallbackStore), typeof(HeapCallbackStore));
            consumerStore = (IConsumerStore)ConfigureComponent(config.GetChild("consumerStore"), typeof(IConsumerStore), typeof(HeapConsumerStore));
            requestIdValidator = (IRequestIdValidator)ConfigureComponent(config.GetChild("requestIdValidator"), typeof(IRequestIdValidator), typeof(HeapRequestIdValidator));
            resourceAccessVerifier = (IResourceAccessVerifier)ConfigureComponent(config.GetChild("resourceAccessVerifier"), typeof(IResourceAccessVerifier), null);
            tokenGenerator = (ITokenGenerator)ConfigureComponent(config.GetChild("tokenGenerator"), typeof(ITokenGenerator), typeof(GuidTokenGenerator));
            verificationProvider = (IVerificationProvider)ConfigureComponent(config.GetChild("verificationProvider"), typeof(IVerificationProvider), typeof(MD5HashVerificationProvider));

            allowOutOfBandCallback = config.GetBoolean("oobCallback");
        }
Exemplo n.º 31
0
 public PublicAuthenticator(string baseUri, string tokenUri, string callBackUrl, ITokenStore store, string scope = null, bool redirectOnError = false)
     : base(baseUri, tokenUri, callBackUrl, store)
 {
     _scope           = scope;
     _redirectOnError = redirectOnError;
 }
Exemplo n.º 32
0
 private PartnerAuthenticator(string baseUri, string authorizeUri, string callBackUri, ITokenStore store, string scope = null)
     : base(baseUri, authorizeUri, callBackUri, store)
 {
     _scope = scope;
 }
Exemplo n.º 33
0
 public PartnerAuthenticator(ITokenStore store, IXeroApiSettings xeroApiSettings)
     : base(store, xeroApiSettings)
 {
 }
Exemplo n.º 34
0
        /// <summary>
        /// Creates a new <see cref="SecretStore"/> backed by the operating system keychain /
        /// secrets vault.
        /// </summary>
        /// <param name="namespace">The namespace of the secrets written and read by this store.</param>
        /// <param name="credentialCache">
        /// (optional) Write-through, read-first cache. Default cache is used if a custom cache is
        /// not provided.
        /// </param>
        /// <param name="tokenCache">
        /// (optional) Write-through, read-first cache. Default cache is used if a custom cache is
        /// not provided.
        /// </param>
        public SecretStore(string @namespace, ICredentialStore credentialCache = null, ITokenStore tokenCache = null, Secret.UriNameConversion getTargetName = null)
        {
            if (String.IsNullOrWhiteSpace(@namespace) || @namespace.IndexOfAny(IllegalCharacters) != -1)
            {
                throw new ArgumentNullException("prefix", "The `prefix` parameter is null or invalid.");
            }

            _getTargetName = getTargetName ?? Secret.UriToSimpleName;

            _namespace       = @namespace;
            _credentialCache = credentialCache ?? new SecretCache(@namespace, _getTargetName);
            _tokenCache      = tokenCache ?? new SecretCache(@namespace, _getTargetName);
        }
Exemplo n.º 35
0
 public PartnerAuthenticator(string baseUri, string authorizeUri, string callBackUri, ITokenStore store, string signingCertificatePath, string scope = null)
     : this(baseUri, authorizeUri, callBackUri, store, signingCertificatePath, "", scope)
 {
 }
Exemplo n.º 36
0
 public PartnerAuthenticator(string baseUri, string authorizeUri, string callBackUri, ITokenStore store, string signingCertificatePath, string certificatePath, string password)
     : this(baseUri, authorizeUri, callBackUri, store)
 {
     _signingCertificate = new X509Certificate2(signingCertificatePath);
     _certificate        = new X509Certificate2(certificatePath, password);
 }
Exemplo n.º 37
0
 public PartnerAuthenticator(string baseUri, string authorizeUri, string callBackUri, ITokenStore store, X509Certificate2 signingCertificate, X509Certificate2 certificate)
     : this(baseUri, authorizeUri, callBackUri, store)
 {
     _signingCertificate = signingCertificate;
     _certificate        = certificate;
 }
Exemplo n.º 38
0
 protected TokenStoreAuthenticatorBase(ITokenStore store)
 {
     Store = store;
 }
Exemplo n.º 39
0
 private PartnerAuthenticator(string baseUri, string authorizeUri, string callBackUri, ITokenStore store)
     : base(baseUri, authorizeUri, callBackUri, store)
 {
 }
Exemplo n.º 40
0
 public void Setup()
 {
     _mockTokenStore = new MockTokenStore();
     _tokenStore     = _mockTokenStore.GetImplementation <ITokenStore>(null);
 }
Exemplo n.º 41
0
 public PublishEvent(ISlackTeamRepository teamRepo, ITokenStore tokenStore, IMessageSession session, IGlobalSettingsClient gameweekClient)
 {
     _teamRepo       = teamRepo;
     _session        = session;
     _gameweekClient = gameweekClient;
 }
Exemplo n.º 42
0
 public GrantedTokenHelper(ITokenStore tokenStore, IGrantedTokenValidator grantedTokenValidator)
 {
     _tokenStore            = tokenStore;
     _grantedTokenValidator = grantedTokenValidator;
 }
Exemplo n.º 43
0
 public GetTokenByTicketIdAction(ITicketStore ticketStore, IUmaConfigurationService configurationService,
                                 IUmaServerEventSource umaServerEventSource, IAuthorizationPolicyValidator authorizationPolicyValidator, IAuthenticateInstructionGenerator authenticateInstructionGenerator,
                                 IAuthenticateClient authenticateClient, IJwtGenerator jwtGenerator, IClientHelper clientHelper, ITokenStore tokenStore)
 {
     _ticketStore                      = ticketStore;
     _configurationService             = configurationService;
     _umaServerEventSource             = umaServerEventSource;
     _authorizationPolicyValidator     = authorizationPolicyValidator;
     _authenticateInstructionGenerator = authenticateInstructionGenerator;
     _authenticateClient               = authenticateClient;
     _jwtGenerator                     = jwtGenerator;
     _clientHelper                     = clientHelper;
     _tokenStore = tokenStore;
 }
Exemplo n.º 44
0
 public HelpEventHandler(IEnumerable <IHandleAppMentions> allHandlers, ISlackClientBuilder slackClientService, ITokenStore tokenStore, ILogger <HelpEventHandler> logger)
 {
     _handlers           = allHandlers;
     _slackClientService = slackClientService;
     _tokenStore         = tokenStore;
     _logger             = logger;
 }
Exemplo n.º 45
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IntrospectionController"/> class.
 /// </summary>
 /// <param name="tokenStore">The token store.</param>
 public IntrospectionController(ITokenStore tokenStore)
 {
     _introspectionActions = new PostIntrospectionAction(tokenStore);
 }
Exemplo n.º 46
0
        public static TService GetClient <TService>(string serviceUri, string applicationId, string applicationSecret, ITokenStore tokenStore)
        {
            ServiceProxy <TService> proxy = new ServiceProxy <TService>(serviceUri, applicationId, applicationSecret, tokenStore);

            return((TService)proxy.GetTransparentProxy());
        }
Exemplo n.º 47
0
 public PartnerAuthenticator(string baseUri, string authorizeUri, string callBackUri, ITokenStore store, string signingCertificatePath, string signingCertPassword, string scope = null)
     : this(baseUri, authorizeUri, callBackUri, store, scope)
 {
     _signingCertificate = new X509Certificate2(signingCertificatePath, signingCertPassword, X509KeyStorageFlags.MachineKeySet);
 }
Exemplo n.º 48
0
 public SagaManager(ISagaPersister sagaPersister, ITokenStore tokenStore, IDispatchMessages dispatcher)
 {
     this.sagaPersister = sagaPersister;
     this.tokenStore    = tokenStore;
     this.dispatcher    = dispatcher;
 }
Exemplo n.º 49
0
 public MpnsAgent(AppSecret secret, INotificationConsumer consumer, ITokenStore store)
     : base(secret, consumer, store, _settings)
 {
 }
 public PublicAuthenticator(ITokenStore store)
     : base(store)
 {
 }
Exemplo n.º 51
0
 public PartnerMvcAuthenticator(string baseUri, string authorizeUri, string callBackUri,
                                ITokenStore store, string signingCertificatePath, IConsumer consumer, ITokenStore requestTokenStore)
     : this(baseUri, authorizeUri, callBackUri, store, signingCertificatePath, consumer, requestTokenStore, "")
 {
 }
 public AuthorizationInterceptor(ITokenStore store)
 {
     _store = store;
 }
Exemplo n.º 53
0
 public PartnerAuthenticator(ITokenStore store)
     : base(store, new XeroApiSettings())
 {
 }
Exemplo n.º 54
0
 internal AntiForgeryWorker(IAntiForgeryTokenSerializer serializer, IAntiForgeryConfig config, ITokenStore tokenStore, ITokenValidator validator)
 {
     _serializer = serializer;
     _config     = config;
     _tokenStore = tokenStore;
     _validator  = validator;
 }
Exemplo n.º 55
0
 public PublicAuthenticator(string baseUri, string tokenUri, string callBackUrl, ITokenStore store) 
     : base(baseUri, tokenUri, callBackUrl, store)
 {            
 }
Exemplo n.º 56
0
 private PartnerMvcAuthenticator(string baseUri, string authorizeUri, string callBackUri,
                                 ITokenStore store, IConsumer consumer, ITokenStore requestTokenStore)
     : base(baseUri, authorizeUri, callBackUri, store, consumer, requestTokenStore)
 {
 }
Exemplo n.º 57
0
 public XeroCoreApi(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IRateLimiter rateLimiter, ITokenStore tokenStore)
     : this(baseUri, auth, consumer, user, new DefaultMapper(), new DefaultMapper(), rateLimiter, tokenStore)
 {
 }
Exemplo n.º 58
0
 public ApiClient(string serviceUri, string applicationId, string applicationSecret, ITokenStore tokenStore)
     : base(serviceUri, applicationId, applicationSecret, tokenStore)
 {
 }
Exemplo n.º 59
0
 public TenantAccess(XeroClient client, ITokenStore tokenStorage)
 {
     Client       = client;
     TokenStorage = tokenStorage;
 }
Exemplo n.º 60
0
 protected TokenStoreAuthenticator(string baseUri, string tokenUri, string callBackUri, ITokenStore store)
 {
     _tokenUri   = tokenUri;
     CallBackUri = callBackUri;
     BaseUri     = baseUri;
     Store       = store;
 }