Beispiel #1
0
 protected ClientBase(AuthorizationServerDescription authorizationServer, string clientIdentifier = null, ClientCredentialApplicator clientCredentialApplicator = null, IHostFactories hostFactories = null)
 {
     this.AuthorizationServer        = authorizationServer;
     this.Channel                    = new OAuth2ClientChannel(hostFactories);
     this.ClientIdentifier           = clientIdentifier;
     this.ClientCredentialApplicator = clientCredentialApplicator;
 }
Beispiel #2
0
 /// <summary>
 /// 没有密码返回null,否则返回网络凭据
 /// </summary>
 /// <param name="secret"></param>
 /// <returns></returns>
 protected static ClientCredentialApplicator DefaultSecretApplicator(string secret)
 {
     return(secret == null?ClientCredentialApplicator.NoSecret() : ClientCredentialApplicator.NetworkCredential(secret));
 }
Beispiel #3
0
 public WebServerClient(AuthorizationServerDescription authorizationServer, string clientIdentifier, ClientCredentialApplicator clientCredentialApplicator, IHostFactories hostFactories = null)
     : base(authorizationServer, clientIdentifier, clientCredentialApplicator, hostFactories)
 {
 }