KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > security > auth > login > FailedLoginException

javax.security.auth.login
Class FailedLoginException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.security.GeneralSecurityException
              extended by javax.security.auth.login.LoginException
                  extended by 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;

Popular Tags