public BusinessLogic(ITicketStore store, ITicketSearch search, IDataLoader dataLoader, ILogger <BusinessLogic> logger) { this.store = store; this.search = search; this.logger = logger; this.dataLoader = dataLoader; }
public CasSingleSignOutMiddlewareTest() { // Arrange store = Mock.Of <ITicketStore>(); server = new TestServer(new WebHostBuilder() .Configure(app => { app.UseCasSingleSignOut(store); })); client = server.CreateClient(); }
public CasSingleSignOutMiddlewareTest(CasFixture fixture) { _fixture = fixture; // Arrange _store = Mock.Of <ITicketStore>(); _server = new TestServer(new WebHostBuilder() .Configure(app => { app.UseCasSingleSignOut(_store); })); _client = _server.CreateClient(); }
public AddPermissionAction( IResourceSetRepository resourceSetRepository, ITicketStore ticketStore, IRepositoryExceptionHelper repositoryExceptionHelper, IUmaConfigurationService configurationService, IUmaServerEventSource umaServerEventSource) { _resourceSetRepository = resourceSetRepository; _ticketStore = ticketStore; _repositoryExceptionHelper = repositoryExceptionHelper; _configurationService = configurationService; _umaServerEventSource = umaServerEventSource; }
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; }
/// <summary> /// Initializes a new instance of the <see cref="PermissionsController"/> class. /// </summary> /// <param name="authenticationService">The default authentication service.</param> /// <param name="resourceSetRepository">The resource set repository.</param> /// <param name="ticketStore">The ticket store.</param> /// <param name="options">The options.</param> /// <param name="eventPublisher">The event publisher.</param> /// <param name="tokenStore">The token store.</param> /// <param name="logger">The logger</param> public PermissionsController( IAuthenticationService authenticationService, IResourceSetRepository resourceSetRepository, ITicketStore ticketStore, RuntimeSettings options, IEventPublisher eventPublisher, ITokenStore tokenStore, ILogger <PermissionsController> logger) : base(authenticationService) { _ticketStore = ticketStore; _eventPublisher = eventPublisher; _logger = logger; _resourceSetRepository = resourceSetRepository; _requestPermission = new RequestPermissionHandler(tokenStore, resourceSetRepository, options, logger); }
/// <summary> /// Initializes a new instance of the <see cref="TokenController"/> class. /// </summary> /// <param name="settings">The settings.</param> /// <param name="authorizationCodeStore">The authorization code store.</param> /// <param name="clientStore">The client store.</param> /// <param name="scopeRepository">The scope repository.</param> /// <param name="resourceOwnerRepository"></param> /// <param name="authenticateResourceOwnerServices">The authenticate resource owner services.</param> /// <param name="tokenStore">The token store.</param> /// <param name="ticketStore">The ticket store.</param> /// <param name="jwksStore"></param> /// <param name="resourceSetRepository">The resource set repository.</param> /// <param name="deviceAuthorizationStore">The device authorization store.</param> /// <param name="eventPublisher">The event publisher.</param> /// <param name="logger">The logger.</param> public TokenController( RuntimeSettings settings, IAuthorizationCodeStore authorizationCodeStore, IClientStore clientStore, IScopeRepository scopeRepository, IResourceOwnerRepository resourceOwnerRepository, IEnumerable <IAuthenticateResourceOwnerService> authenticateResourceOwnerServices, ITokenStore tokenStore, ITicketStore ticketStore, IJwksStore jwksStore, IResourceSetRepository resourceSetRepository, IDeviceAuthorizationStore deviceAuthorizationStore, IEventPublisher eventPublisher, ILogger <TokenController> logger) { _logger = logger; _tokenActions = new TokenActions( settings, authorizationCodeStore, clientStore, scopeRepository, jwksStore, resourceOwnerRepository, authenticateResourceOwnerServices, eventPublisher, tokenStore, deviceAuthorizationStore, logger); _umaTokenActions = new UmaTokenActions( ticketStore, settings, clientStore, scopeRepository, tokenStore, resourceSetRepository, jwksStore, eventPublisher, logger); }
public UmaTokenActions( ITicketStore ticketStore, RuntimeSettings configurationService, IClientStore clientStore, IScopeStore scopeRepository, ITokenStore tokenStore, IResourceSetRepository resourceSetRepository, IJwksStore jwksStore, IEventPublisher eventPublisher, ILogger logger) { _ticketStore = ticketStore; _configurationService = configurationService; _authorizationPolicyValidator = new AuthorizationPolicyValidator( jwksStore, resourceSetRepository, eventPublisher); _authenticateClient = new AuthenticateClient(clientStore, jwksStore); _jwtGenerator = new JwtGenerator(clientStore, scopeRepository, jwksStore, logger); _tokenStore = tokenStore; _eventPublisher = eventPublisher; _logger = logger; }
public GrantController(AppService appService, ITypeAdapter typeAdapter, ITicketStore ticketStore) { _appService = appService; _typeAdapter = typeAdapter; _ticketStore = ticketStore; }
public CasSingleSignOutMiddleware(RequestDelegate next, ITicketStore store, ILogger <CasSingleSignOutMiddleware> logger) { this.next = next; this.store = store; this.logger = logger; }
/// <summary> /// Add SAML 2.0 configuration. /// </summary> /// <param name="loginPath">Redirection target used by the handler.</param> /// <param name="slidingExpiration">If set to true the handler re-issue a new cookie with a new expiration time any time it processes a request which is more than halfway through the expiration window.</param> /// <param name="accessDeniedPath">If configured, access denied redirection target used by the handler.</param> /// <param name="sessionStore">Allow configuration of a custom ITicketStore.</param> public static IServiceCollection AddSaml2(this IServiceCollection services, string loginPath = "/Auth/Login", bool slidingExpiration = false, string accessDeniedPath = null, ITicketStore sessionStore = null, SameSiteMode cookieSameSite = SameSiteMode.Lax) { services.AddAuthentication(Saml2Constants.AuthenticationScheme) .AddCookie(Saml2Constants.AuthenticationScheme, o => { o.LoginPath = new PathString(loginPath); o.SlidingExpiration = slidingExpiration; if (!string.IsNullOrEmpty(accessDeniedPath)) { o.AccessDeniedPath = new PathString(accessDeniedPath); } if (sessionStore != null) { o.SessionStore = sessionStore; } o.Cookie.SameSite = cookieSameSite; }); return(services); }
public TicketManager(ITicketStore <TTicket> ticketStore) { _ticketStore = ticketStore; }
public AuthenticationService(IOptions <AuthenticationOptions> options, ITicketStore store, ISystemClock clock) { Options = options.Value; Clock = clock; Store = store; }
public static IApplicationBuilder UseCasSingleSignOut(this IApplicationBuilder app, ITicketStore store) { if (app == null) { throw new ArgumentNullException(nameof(app)); } if (store == null) { throw new ArgumentNullException(nameof(store)); } return(app.UseMiddleware <CasSingleSignOutMiddleware>(store)); }
private TestServer CreateServer(ITicketStore store) { return(new TestServer(new WebHostBuilder() .Configure(app => app.UseCasSingleSignOut(store)))); }
/// <summary> /// 创建 /// </summary> /// <param name="platform"></param> public JsSdk(IPlatform platform) { Platform = platform ?? throw new ArgumentNullException(); TicketStore = new Provider.InProcess.TicketStore(); }
public SessionStoreOptions(ITicketStore store) { _store = store; }
public InjectedAuthenticationOptions(ITicketStore tickerStore) { _ticketStore = tickerStore; }
public ConfigureCookieAuthenticationOptions(ITicketStore ticketStore) { _ticketStore = ticketStore; }
public ConfigureCookieOptions(ITicketStore ticketStore) { this.ticketStore = ticketStore; }