/// <summary>
        /// Creates the test client using the specified server.
        /// </summary>
        /// <param name="server">The server.</param>
        /// <returns>The test client.</returns>
        public virtual IdentityServerClient Create(IIdentityServer server)
        {
            if (server == null)
            {
                throw new ArgumentNullException(nameof(server));
            }

            return(new IdentityServerClient(
                       server: server,
                       clientId: this.currentClientId,
                       clientSecret: this.currentClientSecret));
        }
 protected StateController()
     : base()
 {
     try
     {
         if (EcpState.IsLogin() != true)
         {
             IIdentityServer server = NServiceProvider.GetService <IIdentityServer>();
             string          auth   = HttpContextProvider.Current.Request.Headers["Authorization"];
             EcpState        state  = server.InspurIdSSO(auth).Result;
             EcpState.SetCurrent(state);
         }
     }
     catch (Exception ex)
     {
         throw new ForbidException(ex.Message, ex);
     }
 }
Exemple #3
0
 public UserValidation(IIdentityServer identityServer, ILogger <UserValidation> logger)
 {
     _identityServer = identityServer;
     _logger         = logger;
 }
Exemple #4
0
 public LoginController(IIdentityServer svr)
 {
     _identityServer = svr;
 }
Exemple #5
0
 public SignalRValidation(IIdentityServer identityServer, ILogger <SignalRValidation> logger)
 {
     _identityServer = identityServer;
     _logger         = logger;
 }
Exemple #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IdentityServerClient"/> class.
 /// </summary>
 /// <param name="server">The server.</param>
 /// <param name="clientId">The client identifier.</param>
 /// <param name="clientSecret">The client secret.</param>
 public IdentityServerClient(IIdentityServer server, string clientId, string clientSecret)
 {
     this.server       = server ?? throw new ArgumentNullException(nameof(server));
     this.ClientId     = clientId;
     this.ClientSecret = clientSecret;
 }