Java 类javax.security.auth.login.CredentialExpiredException 实例源码

项目:springboot-shiro-cas-mybatis    文件:DefaultAccountStateHandler.java   
/**
 * Instantiates a new account state handler, that populates
 * the error map with LDAP error codes and corresponding exceptions.
 */
public DefaultAccountStateHandler() {
    this.errorMap = new HashMap<>();
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_DISABLED, new AccountDisabledException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_LOCKED_OUT, new AccountLockedException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.INVALID_LOGON_HOURS, new InvalidLoginTimeException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.INVALID_WORKSTATION, new InvalidLoginLocationException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.PASSWORD_MUST_CHANGE, new AccountPasswordMustChangeException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(EDirectoryAccountState.Error.ACCOUNT_EXPIRED, new AccountExpiredException());
    this.errorMap.put(EDirectoryAccountState.Error.LOGIN_LOCKOUT, new AccountLockedException());
    this.errorMap.put(EDirectoryAccountState.Error.LOGIN_TIME_LIMITED, new InvalidLoginTimeException());
    this.errorMap.put(EDirectoryAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordExpirationAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordPolicyControl.Error.ACCOUNT_LOCKED, new AccountLockedException());
    this.errorMap.put(PasswordPolicyControl.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordPolicyControl.Error.CHANGE_AFTER_RESET, new AccountPasswordMustChangeException());
}
项目:springboot-shiro-cas-mybatis    文件:DefaultAccountStateHandler.java   
/**
 * Instantiates a new account state handler, that populates
 * the error map with LDAP error codes and corresponding exceptions.
 */
public DefaultAccountStateHandler() {
    this.errorMap = new HashMap<>();
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_DISABLED, new AccountDisabledException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_LOCKED_OUT, new AccountLockedException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.INVALID_LOGON_HOURS, new InvalidLoginTimeException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.INVALID_WORKSTATION, new InvalidLoginLocationException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.PASSWORD_MUST_CHANGE, new AccountPasswordMustChangeException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(EDirectoryAccountState.Error.ACCOUNT_EXPIRED, new AccountExpiredException());
    this.errorMap.put(EDirectoryAccountState.Error.LOGIN_LOCKOUT, new AccountLockedException());
    this.errorMap.put(EDirectoryAccountState.Error.LOGIN_TIME_LIMITED, new InvalidLoginTimeException());
    this.errorMap.put(EDirectoryAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordExpirationAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordPolicyControl.Error.ACCOUNT_LOCKED, new AccountLockedException());
    this.errorMap.put(PasswordPolicyControl.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordPolicyControl.Error.CHANGE_AFTER_RESET, new CredentialExpiredException());
}
项目:cas-5.1.0    文件:DefaultWebflowConfigurer.java   
/**
 * Create handle authentication failure action.
 *
 * @param flow the flow
 */
protected void createHandleAuthenticationFailureAction(final Flow flow) {
    final ActionState handler = createActionState(flow,
            "handleAuthenticationFailure",
            createEvaluateAction("authenticationExceptionHandler"));
    createTransitionForState(handler, AccountDisabledException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_ACCOUNT_DISABLED);
    createTransitionForState(handler, AccountLockedException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_ACCOUNT_LOCKED);
    createTransitionForState(handler, AccountPasswordMustChangeException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_MUST_CHANGE_PASSWORD);
    createTransitionForState(handler, CredentialExpiredException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_EXPIRED_PASSWORD);
    createTransitionForState(handler, InvalidLoginLocationException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_INVALID_WORKSTATION);
    createTransitionForState(handler, InvalidLoginTimeException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_INVALID_AUTHENTICATION_HOURS);
    createTransitionForState(handler, FailedLoginException.class.getSimpleName(), CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    createTransitionForState(handler, AccountNotFoundException.class.getSimpleName(), CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    createTransitionForState(handler, UnauthorizedServiceForPrincipalException.class.getSimpleName(), CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    createTransitionForState(handler, PrincipalException.class.getSimpleName(), CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    createTransitionForState(handler, UnsatisfiedAuthenticationPolicyException.class.getSimpleName(), CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    createTransitionForState(handler, UnauthorizedAuthenticationException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_AUTHENTICATION_BLOCKED);
    createStateDefaultTransition(handler, CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);

}
项目:cas-server-4.2.1    文件:DefaultAccountStateHandler.java   
/**
 * Instantiates a new account state handler, that populates
 * the error map with LDAP error codes and corresponding exceptions.
 */
public DefaultAccountStateHandler() {
    this.errorMap = new HashMap<>();
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_DISABLED, new AccountDisabledException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_LOCKED_OUT, new AccountLockedException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.INVALID_LOGON_HOURS, new InvalidLoginTimeException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.INVALID_WORKSTATION, new InvalidLoginLocationException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.PASSWORD_MUST_CHANGE, new AccountPasswordMustChangeException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(EDirectoryAccountState.Error.ACCOUNT_EXPIRED, new AccountExpiredException());
    this.errorMap.put(EDirectoryAccountState.Error.LOGIN_LOCKOUT, new AccountLockedException());
    this.errorMap.put(EDirectoryAccountState.Error.LOGIN_TIME_LIMITED, new InvalidLoginTimeException());
    this.errorMap.put(EDirectoryAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordExpirationAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordPolicyControl.Error.ACCOUNT_LOCKED, new AccountLockedException());
    this.errorMap.put(PasswordPolicyControl.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordPolicyControl.Error.CHANGE_AFTER_RESET, new CredentialExpiredException());
}
项目:cas4.1.9    文件:DefaultAccountStateHandler.java   
/**
 * Instantiates a new account state handler, that populates
 * the error map with LDAP error codes and corresponding exceptions.
 */
public DefaultAccountStateHandler() {
    this.errorMap = new HashMap<>();
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_DISABLED, new AccountDisabledException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_LOCKED_OUT, new AccountLockedException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.INVALID_LOGON_HOURS, new InvalidLoginTimeException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.INVALID_WORKSTATION, new InvalidLoginLocationException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.PASSWORD_MUST_CHANGE, new AccountPasswordMustChangeException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(EDirectoryAccountState.Error.ACCOUNT_EXPIRED, new AccountExpiredException());
    this.errorMap.put(EDirectoryAccountState.Error.LOGIN_LOCKOUT, new AccountLockedException());
    this.errorMap.put(EDirectoryAccountState.Error.LOGIN_TIME_LIMITED, new InvalidLoginTimeException());
    this.errorMap.put(EDirectoryAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordExpirationAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordPolicyControl.Error.ACCOUNT_LOCKED, new AccountLockedException());
    this.errorMap.put(PasswordPolicyControl.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordPolicyControl.Error.CHANGE_AFTER_RESET, new CredentialExpiredException());
}
项目:iaf    文件:SsoUtil.java   
public static String getSsoToken() throws WSSecurityException, CredentialDestroyedException, CredentialExpiredException {
    String result=null;

    Subject subj=WSSubject.getCallerSubject();

    if (subj==null) {
        throw new WSSecurityException("could not find Subject");
    }
    Set pubs=subj.getPublicCredentials();
    if (pubs==null) {
        throw new WSSecurityException("could not find PublicCredentials");
    }
    for (Iterator it=pubs.iterator();result==null && it.hasNext();) {
        Object pc = it.next();
        if (pc instanceof WSCredentialImpl) {
            WSCredentialImpl wsci = (WSCredentialImpl)pc;
            byte token[] = wsci.getCredentialToken();
            if (token!=null && token.length>0) {
                result=Base64.encodeBase64String(token);
            }
        }
    }
    return result;
}
项目:cas-5.1.0    文件:DefaultAccountStateHandler.java   
/**
 * Instantiates a new account state handler, that populates
 * the error map with LDAP error codes and corresponding exceptions.
 */
public DefaultAccountStateHandler() {
    this.errorMap = new HashMap<>();
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_DISABLED, new AccountDisabledException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_LOCKED_OUT, new AccountLockedException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.INVALID_LOGON_HOURS, new InvalidLoginTimeException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.INVALID_WORKSTATION, new InvalidLoginLocationException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.PASSWORD_MUST_CHANGE, new AccountPasswordMustChangeException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(ActiveDirectoryAccountState.Error.ACCOUNT_EXPIRED, new AccountExpiredException());
    this.errorMap.put(EDirectoryAccountState.Error.ACCOUNT_EXPIRED, new AccountExpiredException());
    this.errorMap.put(EDirectoryAccountState.Error.LOGIN_LOCKOUT, new AccountLockedException());
    this.errorMap.put(EDirectoryAccountState.Error.LOGIN_TIME_LIMITED, new InvalidLoginTimeException());
    this.errorMap.put(EDirectoryAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordExpirationAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordPolicyControl.Error.ACCOUNT_LOCKED, new AccountLockedException());
    this.errorMap.put(PasswordPolicyControl.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(PasswordPolicyControl.Error.CHANGE_AFTER_RESET, new AccountPasswordMustChangeException());
    this.errorMap.put(FreeIPAAccountState.Error.FAILED_AUTHENTICATION, new FailedLoginException());
    this.errorMap.put(FreeIPAAccountState.Error.PASSWORD_EXPIRED, new CredentialExpiredException());
    this.errorMap.put(FreeIPAAccountState.Error.ACCOUNT_EXPIRED, new AccountExpiredException());
    this.errorMap.put(FreeIPAAccountState.Error.MAXIMUM_LOGINS_EXCEEDED, new AccountLockedException());
    this.errorMap.put(FreeIPAAccountState.Error.LOGIN_TIME_LIMITED, new InvalidLoginTimeException());
    this.errorMap.put(FreeIPAAccountState.Error.LOGIN_LOCKOUT, new AccountLockedException());
    this.errorMap.put(FreeIPAAccountState.Error.ACCOUNT_NOT_FOUND, new AccountNotFoundException());
    this.errorMap.put(FreeIPAAccountState.Error.CREDENTIAL_NOT_FOUND, new FailedLoginException());
    this.errorMap.put(FreeIPAAccountState.Error.ACCOUNT_DISABLED, new AccountDisabledException());
}
项目:cn1    文件:CredentialExpiredExceptionTest.java   
/**
 * @tests javax.security.auth.login.CredentialExpiredException#CredentialExpiredException(
 *        java.lang.String)
 */
public final void testCtor2() {
    assertNull(new CredentialExpiredException(null).getMessage());

    String message = "";
    assertSame(message, new CredentialExpiredException(message)
            .getMessage());

    message = "message";
    assertSame(message, new CredentialExpiredException(message)
            .getMessage());
}
项目:freeVM    文件:CredentialExpiredExceptionTest.java   
/**
 * @tests javax.security.auth.login.CredentialExpiredException#CredentialExpiredException(
 *        java.lang.String)
 */
public final void testCtor2() {
    assertNull(new CredentialExpiredException(null).getMessage());

    String message = "";
    assertSame(message, new CredentialExpiredException(message)
            .getMessage());

    message = "message";
    assertSame(message, new CredentialExpiredException(message)
            .getMessage());
}
项目:freeVM    文件:CredentialExpiredExceptionTest.java   
/**
 * @tests javax.security.auth.login.CredentialExpiredException#CredentialExpiredException(
 *        java.lang.String)
 */
public final void testCtor2() {
    assertNull(new CredentialExpiredException(null).getMessage());

    String message = "";
    assertSame(message, new CredentialExpiredException(message)
            .getMessage());

    message = "message";
    assertSame(message, new CredentialExpiredException(message)
            .getMessage());
}
项目:cn1    文件:CredentialExpiredExceptionTest.java   
@Override
protected Object[] getData() {
    return new Object[] {new CredentialExpiredException("message")};
}
项目:cn1    文件:CredentialExpiredExceptionTest.java   
/**
 * @tests javax.security.auth.login.CredentialExpiredException#CredentialExpiredException()
 */
public final void testCtor1() {
    assertNull(new CredentialExpiredException().getMessage());
}
项目:freeVM    文件:CredentialExpiredExceptionTest.java   
@Override
protected Object[] getData() {
    return new Object[] {new CredentialExpiredException("message")};
}
项目:freeVM    文件:CredentialExpiredExceptionTest.java   
/**
 * @tests javax.security.auth.login.CredentialExpiredException#CredentialExpiredException()
 */
public final void testCtor1() {
    assertNull(new CredentialExpiredException().getMessage());
}
项目:freeVM    文件:CredentialExpiredExceptionTest.java   
@Override
protected Object[] getData() {
    return new Object[] {new CredentialExpiredException("message")};
}
项目:freeVM    文件:CredentialExpiredExceptionTest.java   
/**
 * @tests javax.security.auth.login.CredentialExpiredException#CredentialExpiredException()
 */
public final void testCtor1() {
    assertNull(new CredentialExpiredException().getMessage());
}