當前位置: 首頁>>代碼示例>>C#>>正文


C# Authenticator類代碼示例

本文整理匯總了C#中Authenticator的典型用法代碼示例。如果您正苦於以下問題:C# Authenticator類的具體用法?C# Authenticator怎麽用?C# Authenticator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Authenticator類屬於命名空間,在下文中一共展示了Authenticator類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PSAuthLoginProof

 public PSAuthLoginProof(Authenticator authenticator)
     : base(LoginOpcodes.AUTH_LOGIN_PROOF)
 {
     Write((byte)AccountStatus.Ok);
     Write(authenticator.SRP6.M2);
     this.WriteNullByte(4);
 }
開發者ID:Refuge89,項目名稱:Vanilla,代碼行數:7,代碼來源:PSAuthLoginProof.cs

示例2: GetClientInstance

        public static async Task<ExchangeClient> GetClientInstance()
        {
            Authenticator authenticator = new Authenticator();
            var authInfo = await authenticator.AuthenticateAsync(ExchangeResourceId);

            return new ExchangeClient(new Uri(ExchangeServiceRoot), authInfo.GetAccessToken);
        }
開發者ID:khoingo,項目名稱:KhoiRepository,代碼行數:7,代碼來源:Office365Authenticator.cs

示例3: EnsureClientCreated

        private static async Task<ExchangeClient> EnsureClientCreated()
        {
            Authenticator authenticator = new Authenticator();
            var authInfo = await authenticator.AuthenticateAsync(ExchangeResourceId);

            return new ExchangeClient(new Uri(ExchangeServiceRoot), authInfo.GetAccessToken);
        }
開發者ID:khoingo,項目名稱:KhoiRepository,代碼行數:7,代碼來源:CalendarApiSample.cs

示例4: Setup

 public void Setup()
 {
     var driveAuthenticator = new Authenticator();
     driveAuthenticator.Authenticate("test");
     this.googleDriveServiceProvider = new GoogleDriveServiceProvider(driveAuthenticator);
     this.testee = new FileDownloader(this.googleDriveServiceProvider);
 }
開發者ID:andrinbuerli,項目名稱:webdrivemanager,代碼行數:7,代碼來源:DriveFileDownloaderTest.cs

示例5: Setup

 public void Setup()
 {
     var authenticator = new Authenticator();
     authenticator.Authenticate("test");
     var serviceProvider = new GoogleDriveServiceProvider(authenticator);
     this.testee = new FolderSynchronizer(new FilesGetter(serviceProvider), new FileDownloader(serviceProvider));
 }
開發者ID:andrinbuerli,項目名稱:webdrivemanager,代碼行數:7,代碼來源:FolderSynchronizerTest.cs

示例6: EnsureClientCreated

        public static async Task<AadGraphClient> EnsureClientCreated(Context context)
        {
            Authenticator authenticator = new Authenticator(context);
            var authInfo = await authenticator.AuthenticateAsync(AadGraphResource);

            return new AadGraphClient(new Uri(AadGraphResource + authInfo.IdToken.TenantId), authInfo.GetAccessToken);
        }
開發者ID:modulexcite,項目名稱:TrainingContent,代碼行數:7,代碼來源:ActiveDirectoryApiSample.cs

示例7: ClientInterface

        public ClientInterface(IrcLoginCreds loginCreds, List<IrcComponent> auxComponents)
        {
            KillClient = false;
            Client = new IrcClient();
            Client.SendDelay = 200;
            Client.ActiveChannelSyncing = true;
            //Client.AutoRetry = true;
            _loginCreds = loginCreds;
            Client.CtcpVersion = "Pikatwo - Interactive chatbot with lifelike texture by zalzane.";

            _authenticator = new Authenticator();

            _components = auxComponents;
            _components.Add(_authenticator);
            _components.Add(new Reconnector());

            foreach (var component in _components){
                component.IrcInterface = this;
            }

            Client.OnChannelMessage += HandleCommands;
            Client.OnQueryMessage += HandleCommands;
            Client.OnRawMessage += ClientOnOnRawMessage;

            _debugWriter = new StreamWriter("debugOut.txt", true);
            _rawWriter = new StreamWriter("rawOut.txt", true);
        }
開發者ID:bsamuels453,項目名稱:Pikatwo,代碼行數:27,代碼來源:ClientInterface.cs

示例8: EnsureClientCreated

        private static async Task<SharePointClient> EnsureClientCreated()
        {
            Authenticator authenticator = new Authenticator();
            var authInfo = await authenticator.AuthenticateAsync(MyFilesCapability, ServiceIdentifierKind.Capability);

            // Create the MyFiles client proxy:
            return new SharePointClient(authInfo.ServiceUri, authInfo.GetAccessToken);
        }
開發者ID:khoingo,項目名稱:KhoiRepository,代碼行數:8,代碼來源:MyFilesApiSample.cs

示例9: EnsureClientCreated

        public static async Task<SharePointClient> EnsureClientCreated(UIViewController context)
        {
            Authenticator authenticator = new Authenticator(context);
            var authInfo = await authenticator.AuthenticateAsync(SharePointResourceId, ServiceIdentifierKind.Resource);

            // Create the SharePoint client proxy:
            return new SharePointClient(new Uri(SharePointServiceRoot), authInfo.GetAccessToken);
        }
開發者ID:bbs14438,項目名稱:MyShuttle.biz,代碼行數:8,代碼來源:InvoiceService.cs

示例10: Authenticate_WhereDownstreamResultEmpty_ReturnsFalse

        public async Task Authenticate_WhereDownstreamResultEmpty_ReturnsFalse()
        {
            // arrange
            var proxy = new AuthenticatorProxyWithResult("");
            authenticator = new Authenticator(proxy);

            // act
            var result = await authenticator.Authenticate("url");

            Assert.IsFalse(result.IsSuccess);
        }
開發者ID:shiftkey,項目名稱:AppDotNet-Win8,代碼行數:11,代碼來源:AuthenticatorTests.cs

示例11: Authenticate_WhereDownstreamResultOccurs_ReturnsSuccess

        public async Task Authenticate_WhereDownstreamResultOccurs_ReturnsSuccess()
        {
            // arrange
            var proxy = new AuthenticatorProxyWithResult("foo");
            authenticator = new Authenticator(proxy);

            // act
            var result = await authenticator.Authenticate("url");

            Assert.IsTrue(result.IsSuccess);
        }
開發者ID:shiftkey,項目名稱:AppDotNet-Win8,代碼行數:11,代碼來源:AuthenticatorTests.cs

示例12: AsyncResumableUploadData

 public AsyncResumableUploadData(AsyncDataHandler handler,
     Authenticator authenticator,
     AbstractEntry payload,
     string httpMethod,
     SendOrPostCallback callback,
     object userData)
     : base(null, null, userData, callback) {
     this.DataHandler = handler;
     this.authenticator = authenticator;
     this.entry = payload;
     this.HttpVerb = httpMethod;
 }
開發者ID:jamesjbigler,項目名稱:googleReaderShares2Blogger,代碼行數:12,代碼來源:resumableupload.cs

示例13: EnsureExchangeClient

        public async Task<ExchangeClient> EnsureExchangeClient()
        {
            if (_exchangeClient != null)
                return _exchangeClient;

            var authenticator = new Authenticator();
            _authenticationInfo = await authenticator.AuthenticateAsync(ExchangeResourceId);

            _exchangeClient = new ExchangeClient(new Uri(ExchangeServiceRoot), _authenticationInfo.GetAccessToken);
            _isAuthenticated = true;
            return _exchangeClient;
        }
開發者ID:J0rgeSerran0,項目名稱:PoC-Office365.API.Contacts,代碼行數:12,代碼來源:Office365Contact.cs

示例14: EnsureClientCreated

 public static async Task EnsureClientCreated(Context context) {
   
   Authenticator authenticator = new Authenticator(context);
   var authInfo = await authenticator.AuthenticateAsync(ExchangeResourceId);
   
   _strUserId = authInfo.IdToken.UPN;
   _exchangeClient = new ExchangeClient(new Uri(ExchangeServiceRoot), authInfo.GetAccessToken);
   
   var adAuthInfo = await authInfo.ReauthenticateAsync(AdServiceResourceId);
   _adClient = new AadGraphClient(new Uri("https://graph.windows.net/" + authInfo.IdToken.TenantId), 
                                  adAuthInfo.GetAccessToken);
 }
開發者ID:chrissimusokwe,項目名稱:TrainingContent,代碼行數:12,代碼來源:Office365Service.cs

示例15: LoginLogic

    private IEnumerator LoginLogic()
    {        
        painel.GetComponent<LoadingPanelCreator>().CreateLoadingPanel();

        Authenticator authenticator = new Authenticator()
                                            .setUserName(username.text)
                                            .setPassword(password.text)
                                            .setLoginSuccesfullCallback(loginSuccesfull)
                                            .setLoginFailCallback(loginFail);

        yield return authenticator.makeLogin();    
            
        painel.GetComponent<LoadingPanelCreator>().DestroyLoadingPanel();
    }
開發者ID:gabrielamboss,項目名稱:Ulkoa,代碼行數:14,代碼來源:Login.cs


注:本文中的Authenticator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。