コード例 #1
0
        public OAuthAuthorizationChecker(IPasswordAuthenticationService authService,
                                         LoginRequestCreator loginRequestCreator,
                                         IClaimsIdentityFactory claimsIdentityFactory)
        {
            if (claimsIdentityFactory == null)
            {
                throw new ArgumentNullException(nameof(claimsIdentityFactory));
            }
            if (loginRequestCreator == null)
            {
                throw new ArgumentNullException(nameof(loginRequestCreator));
            }
            if (authService == null)
            {
                throw new ArgumentNullException(nameof(authService));
            }

            this.authService           = authService;
            this.loginRequestCreator   = loginRequestCreator;
            this.claimsIdentityFactory = claimsIdentityFactory;
        }
コード例 #2
0
        public LoginController(LoginRequestCreator loginRequestCreator,
                               ILoginLogoutManager loginLogoutManager,
                               IValidatesRedirectUrls redirectUriValidator)
        {
            if (redirectUriValidator == null)
            {
                throw new ArgumentNullException(nameof(redirectUriValidator));
            }
            if (loginLogoutManager == null)
            {
                throw new ArgumentNullException(nameof(loginLogoutManager));
            }
            if (loginRequestCreator == null)
            {
                throw new ArgumentNullException(nameof(loginRequestCreator));
            }

            this.redirectUriValidator = redirectUriValidator;
            this.loginRequestCreator  = loginRequestCreator;
            this.loginLogoutManager   = loginLogoutManager;
        }