コード例 #1
0
        public static string GetRedirectUrl(SignInMessage message, HttpRequestMessage request, CoreSettings settings, InternalConfiguration internalConfig)
        {
            var result = new LoginResult(message, request, settings, internalConfig, internalConfig.LoginPageUrl);
            var response = result.Execute();

            return response.Headers.Location.AbsoluteUri;
        }
 public AuthorizeResponseGenerator(ITokenService tokenService, IAuthorizationCodeStore authorizationCodes, ITokenHandleStore tokenHandles, CoreSettings settings)
 {
     _tokenService = tokenService;
     _authorizationCodes = authorizationCodes;
     _tokenHandles = tokenHandles;
     _settings = settings;
 }
 public AuthorizeInteractionResponseGenerator(CoreSettings settings, IConsentService consent)
 {
     _signIn = new SignInMessage();
     
     _settings = settings;
     _consent = consent;
 }
コード例 #4
0
 public TokenEndpointController(CoreSettings settings, TokenRequestValidator requestValidator, ClientValidator clientValidator, TokenResponseGenerator generator)
 {
     _requestValidator = requestValidator;
     _clientValidator = clientValidator;
     _generator = generator;
     _settings = settings;
 }
 public TokenResponseGenerator(ITokenService tokenService, IRefreshTokenService refreshTokenService, ITokenHandleStore tokenHandles, CoreSettings settings, IAuthorizationCodeStore codes)
 {
     _settings = settings;
     _tokenService = tokenService;
     _refreshTokenService = refreshTokenService;
     _tokenHandles = tokenHandles;
 }
コード例 #6
0
        public static AuthorizeRequestValidator CreateAuthorizeValidator(
            CoreSettings settings = null,
            IScopeService scopes = null,
            IClientService clients = null,
            IUserService users = null,
            ICustomRequestValidator customValidator = null)
        {
            if (settings == null)
            {
                settings = new TestSettings();
            }

            if (scopes == null)
            {
                scopes = new InMemoryScopeService(TestScopes.Get());
            }

            if (clients == null)
            {
                clients = new InMemoryClientService(TestClients.Get());
            }

            if (customValidator == null)
            {
                customValidator = new DefaultCustomRequestValidator();
            }

            if (users == null)
            {
                users = new TestUserService();
            }

            return new AuthorizeRequestValidator(settings, scopes, clients, users, customValidator);
        }
コード例 #7
0
        public static TokenRequestValidator CreateTokenValidator(
            CoreSettings settings = null,
            IScopeService scopes = null,
            IAuthorizationCodeStore authorizationCodeStore = null,
            IUserService userService = null,
            IAssertionGrantValidator assertionGrantValidator = null,
            ICustomRequestValidator customRequestValidator = null)
        {
            if (settings == null)
            {
                settings = new TestSettings();
            }

            if (scopes == null)
            {
                scopes = new InMemoryScopeService(TestScopes.Get());
            }

            if (userService == null)
            {
                userService = new TestUserService();
            }

            if (customRequestValidator == null)
            {
                customRequestValidator = new DefaultCustomRequestValidator();
            }

            if (assertionGrantValidator == null)
            {
                assertionGrantValidator = new TestAssertionValidator();
            }

            return new TokenRequestValidator(settings, authorizationCodeStore, userService, scopes, assertionGrantValidator, customRequestValidator);
        }
コード例 #8
0
 public TokenValidator(CoreSettings settings, IUserService users, IClientService clients, ITokenHandleStore tokenHandles, ICustomTokenValidator customValidator)
 {
     _settings = settings;
     _users = users;
     _clients = clients;
     _tokenHandles = tokenHandles;
     _customValidator = customValidator;
 }
コード例 #9
0
 public LoginResult(SignInMessage message, HttpRequestMessage request, CoreSettings settings, InternalConfiguration internalConfig, string loginPageUrl = "")
 {
     _message = message;
     _settings = settings;
     _request = request;
     _internalConfig = internalConfig;
     _loginPageUrl = loginPageUrl;
 }
コード例 #10
0
 public WsFederationController(CoreSettings settings, IUserService users, SignInValidator validator, SignInResponseGenerator signInResponseGenerator, MetadataResponseGenerator metadataResponseGenerator, ITrackingCookieService cookies, InternalConfiguration internalConfig, WsFederationPluginOptions wsFedOptions)
 {
     _settings = settings;
     _internalConfig = internalConfig;
     _wsfedOptions = wsFedOptions;
     _validator = validator;
     _signInResponseGenerator = signInResponseGenerator;
     _metadataResponseGenerator = metadataResponseGenerator;
     _cookies = cookies;
 }
コード例 #11
0
        IHttpActionResult RedirectToLogin(CoreSettings settings, SignInValidationResult result)
        {
            var message = new SignInMessage();
            message.ReturnUrl = Request.RequestUri.AbsoluteUri;

            if (result.HomeRealm.IsPresent())
            {
                message.IdP = result.HomeRealm;
            }

            var url = LoginResult.GetRedirectUrl(message, this.Request, settings, _internalConfig);
            return Redirect(url);
        }
 public DiscoveryEndpointController(CoreSettings settings, IScopeService scopes)
 {
     _settings = settings;
     _scopes = scopes;
 }
コード例 #13
0
 public SignInResponseGenerator(CoreSettings settings, IUserService users)
 {
     _settings = settings;
     _users = users;
 }
 public UserInfoEndpointController(CoreSettings settings, TokenValidator tokenValidator, UserInfoResponseGenerator generator)
 {
     _tokenValidator = tokenValidator;
     _generator = generator;
     _settings = settings;
 }
 public AccessTokenValidationController(TokenValidator validator, CoreSettings settings)
 {
     _validator = validator;
     _settings = settings;
 }
 public MetadataResponseGenerator(CoreSettings settings)
 {
     _settings = settings;
 }
 public UserInfoResponseGenerator(IUserService users, IScopeService scopes, CoreSettings settings)
 {
     _users = users;
     _scopes = scopes;
     _settings = settings;
 }
 public Task<TokenValidationResult> ValidateAccessTokenAsync(TokenValidationResult result, CoreSettings settings, IClientService clients, IUserService users)
 {
     return Task.FromResult(result);
 }
コード例 #19
0
 public LogoutController(CoreSettings settings)
 {
     _settings = settings;
 }
 public Task<TokenValidationResult> ValidateIdentityTokenAsync(TokenValidationResult result, CoreSettings settings, IClientService clients, IUserService users)
 {
     throw new NotImplementedException();
 }