java.lang.Object
java.lang.Throwable
java.lang.Exception
java.security.GeneralSecurityException
javax.security.auth.login.LoginException
javax.security.auth.login.FailedLoginException
- All Implemented Interfaces:
- Serializable
- See Also:
- Top Examples, Source Code
public FailedLoginException()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public FailedLoginException(String msg)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[749]Handle failed login exception
By Anonymous on 2004/04/26 14:58:31 Rate
boolean res = false;
try {
loginContext = new LoginContext ( configFileEntry, new AuthCallbackHandler ( userid, password ) ) ;
loginContext.login ( ) ;
res = true;
}
catch ( SecurityException se ) {
System.out.println ( "APSAuthenticator::authenticateUser - security exception encountered! " + se ) ;
ASAMDbServerStarter.getDbServerSecurityLog ( ) .Log ( "APSAuthenticator::authenticateUser - security exception encountered = " + se ) ;
se.printStackTrace ( ) ;
}
catch ( FailedLoginException fe ) {
System.out.println ( "APSAuthenticator::authenticateUser - security exception encountered! Failed Login Exception." + fe ) ;
ASAMDbServerStarter.getDbServerSecurityLog ( ) .Log ( "APSAuthenticator::authenticateUser - security exception encountered ( Failed Login Exc. ) = " + fe ) ;
fe.printStackTrace ( ) ;
}
catch ( CredentialExpiredException ce ) {
System.out.println ( "APSAuthenticator::authenticateUser - security exception encountered! Crendential Expired Exception." + ce ) ;
ASAMDbServerStarter.getDbServerSecurityLog ( ) .Log ( "APSAuthenticator::authenticateUser - security exception encountered ( Credential Expired Exc. ) = " + ce ) ;
ce.printStackTrace ( ) ;
}
catch ( AccountExpiredException ae ) {
System.out.println ( "APSAuthenticator::authenticateUser - security exception encountered! Account Expired Exception. " + ae ) ;
ASAMDbServerStarter.getDbServerSecurityLog ( ) .Log ( "APSAuthenticator::authenticateUser - security exception encountered ( Acct. Expired Exc. ) = " + ae ) ;
ae.printStackTrace ( ) ;
}
return res;