Package javax.security.auth.login

Examples of javax.security.auth.login.LoginException.initCause()


            throw le;
         }
         catch(Exception e)
         {
            LoginException le = new LoginException("Failed to delegate createPasswordHash");
            le.initCause(e);
            throw le;           
         }
      }

      DigestCallback callback = null;
View Full Code Here


               callbackHandler.handle(callbacks);
            }
            catch(IOException e)
            {
               LoginException le = new LoginException(digestOption+" callback failed");
               le.initCause(e);
               throw le;
            }
            catch(UnsupportedCallbackException e)
            {
               LoginException le = new LoginException(digestOption+" callback failed");
View Full Code Here

               throw le;
            }
            catch(UnsupportedCallbackException e)
            {
               LoginException le = new LoginException(digestOption+" callback failed");
               le.initCause(e);
               throw le;
            }
         }
      }
      String passwordHash = Util.createPasswordHash(hashAlgorithm, hashEncoding,
View Full Code Here

      }
      catch (Exception ex)
      {
         log.error("Error logging in", ex);
         LoginException le = new LoginException(ex.getMessage());
         le.initCause(ex);
         throw le;
      }
     
      // If an authentication method has been specified, use that to authenticate
      MethodExpression mb = Identity.instance().getAuthenticateMethod();
View Full Code Here

         }
         catch (Exception ex)
         {
            log.error("Error invoking login method", ex);
            LoginException le = new LoginException(ex.getMessage());
            le.initCause(ex);
            throw le;
         }
      }
      else
      {
View Full Code Here

        try {
            callbackHandler.handle(new Callback[]{usernameCallback, passwordCallback});
        } catch (UnsupportedCallbackException ex) {
            LoginException le = new LoginException("callback is not supported");
            le.initCause(ex);
            throw le;
        } catch (IOException ex) {
            LoginException le = new LoginException("io error in callback handler");
            le.initCause(ex);
            throw le;
View Full Code Here

            LoginException le = new LoginException("callback is not supported");
            le.initCause(ex);
            throw le;
        } catch (IOException ex) {
            LoginException le = new LoginException("io error in callback handler");
            le.initCause(ex);
            throw le;
        }

        String password = new String(passwordCallback.getPassword());
        Properties props = new Properties();
View Full Code Here

        return new LoginException(message);
    }
   
    public static LoginException newLoginException(String msg, Throwable cause, Object [] params) {
        LoginException ret = newLoginException(msg, params);
        ret.initCause(cause);
        return ret;
    }
}
View Full Code Here

            return service.performLogin(sessionHandle, lmIndex, callbacks);
        } catch (FailedLoginException e) {
            throw e;
        } catch (Exception e) {
            LoginException le = new LoginException("Error filling callback list");
            le.initCause(e);
            throw le;
        }
    }

    public boolean commit() throws LoginException {
View Full Code Here

            identity = authenticator.createIdentity(identity.getUserId());
            sharedState.put("exo.security.identity", identity);
            return true;
        } catch (Exception e) {
            LoginException le = new LoginException();
            le.initCause(e);
            throw le;
        }
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.