Package javax.security.auth.login

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


         return true;
      }
      catch (final Throwable e)
      {
         LoginException le = new LoginException(e.getMessage());
         le.initCause(e);
         throw le;
      }
   }

   /**
 
View Full Code Here


                sub = subjectHelper.makeSubject(user, userpwd);
            } catch (Exception e) {
                String emsg = "Failed to make subject of user "+user;
                logger.logStack(Logger.ERROR, emsg, e);
                LoginException ex= new LoginException(emsg);
                ex.initCause(e);
                throw ex;
            }
        }
        if (sub != null) {
            lc = new LoginContext(name, sub, cbh);
View Full Code Here

                return service.performServerLogin(clientHandle, index, callbacks);
            } catch (LoginException le) {
                throw le;
            } 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

         } while( rs.next() );
      }
      catch(NamingException ex)
      {
         LoginException le = new LoginException("Error looking up DataSource from: "+dsJndiName);
         le.initCause(ex);
         throw le;
      }
      catch(SQLException ex)
      {
         LoginException le = new LoginException("Query failed");
View Full Code Here

         throw le;
      }
      catch(SQLException ex)
      {
         LoginException le = new LoginException("Query failed");
         le.initCause(ex);
         throw le;
      }
      finally
      {
         if( rs != null )
View Full Code Here

         }
      }
      catch (IOException ioe)
      {
         LoginException ex = new LoginException(ioe.toString());
         ex.initCause(ioe);
         throw ex;
      }
      catch (UnsupportedCallbackException uce)
      {
         LoginException ex = new LoginException("Error: " + uce.getCallback().toString() +
View Full Code Here

      }
      catch (UnsupportedCallbackException uce)
      {
         LoginException ex = new LoginException("Error: " + uce.getCallback().toString() +
            ", not able to use this callback for username/password");
         ex.initCause(uce);
         throw ex;
      }
      if( trace )
         log.trace("End login");
      return true;
View Full Code Here

      catch (Throwable e)
      {
         if( trace )
            log.trace("Failed to create/setSecurityInfo on handler", e);
         LoginException le = new LoginException("Failed to setSecurityInfo on handler");
         le.initCause(e);
         throw le;
      }
      Subject subject = new Subject();
      LoginContext lc = null;
      if( trace )
View Full Code Here

         } while( rs.next() );
      }
      catch(NamingException ex)
      {
         LoginException le = new LoginException("Error looking up DataSource from: "+dsJndiName);
         le.initCause(ex);
         throw le;
      }
      catch(SQLException ex)
      {
         LoginException le = new LoginException("Query failed");
View Full Code Here

         throw le;
      }
      catch(SQLException ex)
      {
         LoginException le = new LoginException("Query failed");
         le.initCause(ex);
         throw le;
      }
      finally
      {
         if( rs != null )
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.