public AuthorizeRequestValidator(IdentityServerOptions options, IClientStore clients, ICustomRequestValidator customValidator, IRedirectUriValidator uriValidator, ScopeValidator scopeValidator, SessionCookie sessionCookie) { _options = options; _clients = clients; _customValidator = customValidator; _uriValidator = uriValidator; _scopeValidator = scopeValidator; _sessionCookie = sessionCookie; }
public WsFederationController(SignInValidator validator, SignInResponseGenerator signInResponseGenerator, MetadataResponseGenerator metadataResponseGenerator, ITrackingCookieService cookies, WsFederationPluginOptions wsFedOptions, IRedirectUriValidator redirectUriValidator) { _validator = validator; _signInResponseGenerator = signInResponseGenerator; _metadataResponseGenerator = metadataResponseGenerator; _cookies = cookies; _wsFedOptions = wsFedOptions; _redirectUriValidator = redirectUriValidator; }
public EndSessionRequestValidator(IdentityServerOptions options, TokenValidator tokenValidator, IRedirectUriValidator uriValidator) { _tokenValidator = tokenValidator; _uriValidator = uriValidator; _validatedRequest = new ValidatedEndSessionRequest { Options = options, }; }
public EndSessionRequestValidator( ILogger <EndSessionRequestValidator> logger, IdentityServerContext context, ITokenValidator tokenValidator, IRedirectUriValidator uriValidator) { _context = context; _tokenValidator = tokenValidator; _uriValidator = uriValidator; _logger = logger; }
public EndSessionRequestValidator(IdentityServerOptions options, IOwinContext context, TokenValidator tokenValidator, IRedirectUriValidator uriValidator) { _tokenValidator = tokenValidator; _uriValidator = uriValidator; _validatedRequest = new ValidatedEndSessionRequest { Options = options, Environment = context.Environment }; }
public static AuthorizeRequestValidator CreateAuthorizeRequestValidator( IdentityServerOptions options = null, IScopeStore scopes = null, IClientStore clients = null, IUserService users = null, ICustomRequestValidator customValidator = null, IRedirectUriValidator uriValidator = null, ScopeValidator scopeValidator = null, IDictionary <string, object> environment = null) { if (options == null) { options = TestIdentityServerOptions.Create(); } if (scopes == null) { scopes = new InMemoryScopeStore(TestScopes.Get()); } if (clients == null) { clients = new InMemoryClientStore(TestClients.Get()); } if (customValidator == null) { customValidator = new DefaultCustomRequestValidator(); } if (uriValidator == null) { uriValidator = new DefaultRedirectUriValidator(); } if (scopeValidator == null) { scopeValidator = new ScopeValidator(scopes); } IOwinContext context; if (environment == null) { context = new OwinContext(new Dictionary <string, object>()); } else { context = new OwinContext(environment); } return(new AuthorizeRequestValidator(options, clients, customValidator, uriValidator, scopeValidator, context)); }
public static AuthorizeRequestValidator CreateAuthorizeRequestValidator( IdentityServerOptions options = null, IScopeStore scopes = null, IClientStore clients = null, IUserService users = null, ICustomRequestValidator customValidator = null, IRedirectUriValidator uriValidator = null, ScopeValidator scopeValidator = null, IDictionary <string, object> environment = null) { if (options == null) { options = TestIdentityServerOptions.Create(); } if (scopes == null) { scopes = new InMemoryScopeStore(TestScopes.Get()); } if (clients == null) { clients = new InMemoryClientStore(TestClients.Get()); } if (customValidator == null) { customValidator = new DefaultCustomRequestValidator(); } if (uriValidator == null) { uriValidator = new StrictRedirectUriValidator(); } if (scopeValidator == null) { scopeValidator = new ScopeValidator(scopes, new LoggerFactory()); } var sessionCookie = new SessionCookie(IdentityServerContextHelper.Create(null, options)); return(new AuthorizeRequestValidator( options, clients, customValidator, uriValidator, scopeValidator, sessionCookie, new Logger <AuthorizeRequestValidator>(new LoggerFactory()) )); }
public static AuthorizeRequestValidator CreateAuthorizeRequestValidator( IdentityServerOptions options = null, IScopeStore scopes = null, IClientStore clients = null, IProfileService profile = null, ICustomRequestValidator customValidator = null, IRedirectUriValidator uriValidator = null, ScopeValidator scopeValidator = null, IDictionary<string, object> environment = null) { if (options == null) { options = TestIdentityServerOptions.Create(); } if (scopes == null) { scopes = new InMemoryScopeStore(TestScopes.Get()); } if (clients == null) { clients = new InMemoryClientStore(TestClients.Get()); } if (customValidator == null) { customValidator = new DefaultCustomRequestValidator(); } if (uriValidator == null) { uriValidator = new StrictRedirectUriValidator(); } if (scopeValidator == null) { scopeValidator = new ScopeValidator(scopes, new LoggerFactory()); } var sessionCookie = new SessionCookie(IdentityServerContextHelper.Create(null, options)); return new AuthorizeRequestValidator( options, clients, customValidator, uriValidator, scopeValidator, sessionCookie, new Logger<AuthorizeRequestValidator>(new LoggerFactory()) ); }
public AuthorizeRequestValidator(IdentityServerOptions options, IClientStore clients, ICustomRequestValidator customValidator, IRedirectUriValidator uriValidator, ScopeValidator scopeValidator, IOwinContext context) { _options = options; _clients = clients; _customValidator = customValidator; _uriValidator = uriValidator; _scopeValidator = scopeValidator; _validatedRequest = new ValidatedAuthorizeRequest { Options = _options, Environment = context.Environment }; }
public static AuthorizeRequestValidator CreateAuthorizeRequestValidator( IdentityServerOptions options = null, IResourceStore resourceStore = null, IClientStore clients = null, IProfileService profile = null, ICustomAuthorizeRequestValidator customValidator = null, IRedirectUriValidator uriValidator = null, ScopeValidator scopeValidator = null) { if (options == null) { options = TestIdentityServerOptions.Create(); } if (resourceStore == null) { resourceStore = new InMemoryResourcesStore(TestScopes.GetIdentity(), TestScopes.GetApis()); } if (clients == null) { clients = new InMemoryClientStore(TestClients.Get()); } if (customValidator == null) { customValidator = new DefaultCustomAuthorizeRequestValidator(); } if (uriValidator == null) { uriValidator = new StrictRedirectUriValidator(); } if (scopeValidator == null) { scopeValidator = new ScopeValidator(resourceStore, new LoggerFactory().CreateLogger <ScopeValidator>()); } var sessionId = new MockSessionIdService(); return(new AuthorizeRequestValidator( options, clients, customValidator, uriValidator, scopeValidator, sessionId, TestLogger.Create <AuthorizeRequestValidator>())); }
public static AuthorizeRequestValidator CreateAuthorizeRequestValidator( IdentityServerOptions options = null, IScopeStore scopes = null, IClientStore clients = null, IUserService users = null, ICustomRequestValidator customValidator = null, IRedirectUriValidator uriValidator = null, ScopeValidator scopeValidator = null, IDictionary <string, object> environment = null) { if (options == null) { options = TestIdentityServerOptions.Create(); } if (scopes == null) { scopes = new InMemoryScopeStore(TestScopes.Get()); } if (clients == null) { clients = new InMemoryClientStore(TestClients.Get()); } if (customValidator == null) { customValidator = new DefaultCustomRequestValidator(); } if (uriValidator == null) { uriValidator = new DefaultRedirectUriValidator(); } if (scopeValidator == null) { scopeValidator = new ScopeValidator(scopes); } var mockSessionCookie = new Mock <SessionCookie>((IOwinContext)null, (IdentityServerOptions)null); mockSessionCookie.CallBase = false; mockSessionCookie.Setup(x => x.GetSessionId()).Returns((string)null); return(new AuthorizeRequestValidator(options, clients, customValidator, uriValidator, scopeValidator, mockSessionCookie.Object)); }
public AuthorizeRequestValidator( IdentityServerOptions options, IClientStore clients, ICustomAuthorizeRequestValidator customValidator, IRedirectUriValidator uriValidator, ScopeValidator scopeValidator, IUserSession userSession, ILogger <AuthorizeRequestValidator> logger) { _options = options; _clients = clients; _customValidator = customValidator; _uriValidator = uriValidator; _scopeValidator = scopeValidator; _userSession = userSession; _logger = logger; }
/// <summary> /// Creates a new instance of the EndSessionRequestValidator. /// </summary> /// <param name="context"></param> /// <param name="options"></param> /// <param name="tokenValidator"></param> /// <param name="uriValidator"></param> /// <param name="userSession"></param> /// <param name="clientStore"></param> /// <param name="endSessionMessageStore"></param> /// <param name="logger"></param> public EndSessionRequestValidator( IHttpContextAccessor context, IdentityServerOptions options, ITokenValidator tokenValidator, IRedirectUriValidator uriValidator, IUserSession userSession, IClientStore clientStore, IMessageStore <EndSession> endSessionMessageStore, ILogger <EndSessionRequestValidator> logger) { Context = context; Options = options; TokenValidator = tokenValidator; UriValidator = uriValidator; UserSession = userSession; ClientStore = clientStore; EndSessionMessageStore = endSessionMessageStore; Logger = logger; }
public EndSessionRequestValidator( IHttpContextAccessor context, IdentityServerOptions options, ITokenValidator tokenValidator, IRedirectUriValidator uriValidator, ISessionIdService sessionId, IClientSessionService clientSession, IClientStore clientStore, ILogger <EndSessionRequestValidator> logger) { _context = context; _options = options; _tokenValidator = tokenValidator; _uriValidator = uriValidator; _sessionId = sessionId; _clientSession = clientSession; _clientStore = clientStore; _logger = logger; }
public WsFederationController( SignInValidator validator, SignInResponseGenerator signInResponseGenerator, MetadataResponseGenerator metadataResponseGenerator, ITrackingCookieService cookies, WsFederationPluginOptions wsFedOptions, IRedirectUriValidator redirectUriValidator, SignOutValidator signOutValidator, Core.Services.OwinEnvironmentService environment) { _validator = validator; _signInResponseGenerator = signInResponseGenerator; _metadataResponseGenerator = metadataResponseGenerator; _cookies = cookies; _wsFedOptions = wsFedOptions; _redirectUriValidator = redirectUriValidator; _signOutValidator = signOutValidator; _events = environment.Environment.ResolveDependency <Core.Services.IEventService>() ?? new DefaultEventService(); }
public AuthorizeRequestValidator( IdentityServerOptions options, IClientStore clients, ICustomAuthorizeRequestValidator customValidator, IRedirectUriValidator uriValidator, IResourceValidator resourceValidator, IUserSession userSession, JwtRequestValidator jwtRequestValidator, IJwtRequestUriHttpClient jwtRequestUriHttpClient, ILogger <AuthorizeRequestValidator> logger) { _options = options; _clients = clients; _customValidator = customValidator; _uriValidator = uriValidator; _resourceValidator = resourceValidator; _jwtRequestValidator = jwtRequestValidator; _userSession = userSession; _jwtRequestUriHttpClient = jwtRequestUriHttpClient; _logger = logger; }
/// <summary> /// Creates a new instance of the EndSessionRequestValidator. /// </summary> /// <param name="context"></param> /// <param name="options"></param> /// <param name="tokenValidator"></param> /// <param name="uriValidator"></param> /// <param name="userSession"></param> /// <param name="logoutNotificationService"></param> /// <param name="endSessionMessageStore"></param> /// <param name="logger"></param> public EndSessionRequestValidator( IHttpContextAccessor context, IdentityServerOptions options, ITokenValidator tokenValidator, IRedirectUriValidator uriValidator, IUserSession userSession, ILogoutNotificationService logoutNotificationService, IMessageStore <LogoutNotificationContext> endSessionMessageStore, ILogger <EndSessionRequestValidator> logger) { #pragma warning disable CS0618 // Type or member is obsolete Context = context; #pragma warning restore CS0618 // Type or member is obsolete Options = options; TokenValidator = tokenValidator; UriValidator = uriValidator; UserSession = userSession; LogoutNotificationService = logoutNotificationService; EndSessionMessageStore = endSessionMessageStore; Logger = logger; }
public IdentityServerMiddlewareConfiguration(IAppEnvironmentProvider appEnvironmentProvider, IScopesProvider scopesProvider, ICertificateProvider certificateProvider, IDependencyManager dependencyManager, IRedirectUriValidator redirectUriValidator, IEventService eventService) { if (appEnvironmentProvider == null) { throw new ArgumentNullException(nameof(appEnvironmentProvider)); } if (scopesProvider == null) { throw new ArgumentNullException(nameof(scopesProvider)); } if (certificateProvider == null) { throw new ArgumentNullException(nameof(certificateProvider)); } if (dependencyManager == null) { throw new ArgumentNullException(nameof(dependencyManager)); } if (redirectUriValidator == null) { throw new ArgumentNullException(nameof(redirectUriValidator)); } if (eventService == null) { throw new ArgumentNullException(nameof(eventService)); } _appEnvironmentProvider = appEnvironmentProvider; _scopesProvider = scopesProvider; _certificateProvider = certificateProvider; _dependencyManager = dependencyManager; _redirectUriValidator = redirectUriValidator; _eventService = eventService; }
public static AuthorizeRequestValidator CreateAuthorizeRequestValidator( IdentityServerOptions options = null, IIssuerNameService issuerNameService = null, IResourceStore resourceStore = null, IClientStore clients = null, IProfileService profile = null, ICustomAuthorizeRequestValidator customValidator = null, IRedirectUriValidator uriValidator = null, IResourceValidator resourceValidator = null, JwtRequestValidator jwtRequestValidator = null, IJwtRequestUriHttpClient jwtRequestUriHttpClient = null) { if (options == null) { options = TestIdentityServerOptions.Create(); } if (issuerNameService == null) { issuerNameService = new TestIssuerNameService(options.IssuerUri); } if (resourceStore == null) { resourceStore = new InMemoryResourcesStore(TestScopes.GetIdentity(), TestScopes.GetApis(), TestScopes.GetScopes()); } if (clients == null) { clients = new InMemoryClientStore(TestClients.Get()); } if (customValidator == null) { customValidator = new DefaultCustomAuthorizeRequestValidator(); } if (uriValidator == null) { uriValidator = new StrictRedirectUriValidator(); } if (resourceValidator == null) { resourceValidator = CreateResourceValidator(resourceStore); } if (jwtRequestValidator == null) { jwtRequestValidator = new JwtRequestValidator("https://identityserver", new LoggerFactory().CreateLogger <JwtRequestValidator>()); } if (jwtRequestUriHttpClient == null) { jwtRequestUriHttpClient = new DefaultJwtRequestUriHttpClient(new HttpClient(new NetworkHandler(new Exception("no jwt request uri response configured"))), options, new LoggerFactory()); } var userSession = new MockUserSession(); return(new AuthorizeRequestValidator( options, issuerNameService, clients, customValidator, uriValidator, resourceValidator, userSession, jwtRequestValidator, jwtRequestUriHttpClient, TestLogger.Create <AuthorizeRequestValidator>())); }
public WsFederationRedirectEndSessionRequestValidator(EndSessionRequestValidator validator, IEnumerable <Client> clients, IHttpContextAccessor context, IdentityServerOptions options, ITokenValidator tokenValidator, IRedirectUriValidator uriValidator, IUserSession userSession, IClientStore clientStore, IMessageStore <EndSession> endSessionMessageStore, ILogger <WsFederationRedirectEndSessionRequestValidator> logger) { _validator = validator; _clients = clients; _logger = logger; }
public static AuthorizeRequestValidator CreateAuthorizeRequestValidator( IdentityServerOptions options = null, IScopeStore scopes = null, IClientStore clients = null, IUserService users = null, ICustomRequestValidator customValidator = null, IRedirectUriValidator uriValidator = null, ScopeValidator scopeValidator = null, IDictionary<string, object> environment = null) { if (options == null) { options = TestIdentityServerOptions.Create(); } if (scopes == null) { scopes = new InMemoryScopeStore(TestScopes.Get()); } if (clients == null) { clients = new InMemoryClientStore(TestClients.Get()); } if (customValidator == null) { customValidator = new DefaultCustomRequestValidator(); } if (uriValidator == null) { uriValidator = new DefaultRedirectUriValidator(); } if (scopeValidator == null) { scopeValidator = new ScopeValidator(scopes); } var mockSessionCookie = new Mock<SessionCookie>((IOwinContext)null, (IdentityServerOptions)null); mockSessionCookie.CallBase = false; mockSessionCookie.Setup(x => x.GetSessionId()).Returns((string)null); return new AuthorizeRequestValidator(options, clients, customValidator, uriValidator, scopeValidator, mockSessionCookie.Object); }
public AbpStrictRedirectUriValidator_Tests() { _abpStrictRedirectUriValidator = GetRequiredService <IRedirectUriValidator>(); }
public static AuthorizeRequestValidator CreateAuthorizeRequestValidator( IdentityServerOptions options = null, IScopeStore scopes = null, IClientStore clients = null, IUserService users = null, ICustomRequestValidator customValidator = null, IRedirectUriValidator uriValidator = null, ScopeValidator scopeValidator = null, IDictionary<string, object> environment = null) { if (options == null) { options = TestIdentityServerOptions.Create(); } if (scopes == null) { scopes = new InMemoryScopeStore(TestScopes.Get()); } if (clients == null) { clients = new InMemoryClientStore(TestClients.Get()); } if (customValidator == null) { customValidator = new DefaultCustomRequestValidator(); } if (uriValidator == null) { uriValidator = new DefaultRedirectUriValidator(); } if (scopeValidator == null) { scopeValidator = new ScopeValidator(scopes); } IOwinContext context; if (environment == null) { context = new OwinContext(new Dictionary<string, object>()); } else { context = new OwinContext(environment); } return new AuthorizeRequestValidator(options, clients, customValidator, uriValidator, scopeValidator, context); }
/// <summary> /// /// </summary> /// <param name="options"></param> /// <param name="clients"></param> /// <param name="uriValidator"></param> public DefaultCustomClientValidator(IdentityServerOptions options, IClientStore clients, IRedirectUriValidator uriValidator) { _options = options; _clients = clients; _uriValidator = uriValidator; }