Package javax.security.auth.message

Examples of javax.security.auth.message.AuthException


            response.sendRedirect(response.encodeRedirectURL(URIUtil.addPaths(request.getContextPath(), _formLoginPage)));
            return AuthStatus.SEND_CONTINUE;
        }
        catch (IOException e)
        {
            throw new AuthException(e.getMessage());
        }
        catch (UnsupportedCallbackException e)
        {
            throw new AuthException(e.getMessage());
        }

    }
View Full Code Here


                if (rvalue) { // cache it only if validateRequest = true
                    messageInfo.getMap().put(SERVER_AUTH_CONTEXT, sAC);
                    req.setAttribute(MESSAGE_INFO, messageInfo);
                }
            } else {
                throw new AuthException("null ServerAuthContext");
            }
        } catch (AuthException ae) {
            if (_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE,
                        "JMAC: http msg authentication fail", ae);
View Full Code Here

         {
            loginContext.logout();
         }
         catch (LoginException e)
         {
            throw new AuthException(e.getLocalizedMessage());
         }
   }
View Full Code Here

         loginContext.login();
         return true;
      }
      catch (Exception e)
      {
         throw new AuthException(e.getLocalizedMessage());
      }  
   }
View Full Code Here

         {
            loginContext.logout();
         }
         catch (LoginException e)
         {
            throw new AuthException(e.getLocalizedMessage());
         }
   }
View Full Code Here

         loginContext.login();
         return true;
      }
      catch (LoginException e)
      {
         throw new AuthException(e.getLocalizedMessage());
     
   }
View Full Code Here

         }
              
      }
      catch (Exception e)
      {
         throw new AuthException(e.getLocalizedMessage());
      }
      return true;
   }
View Full Code Here

            lm.login();
            lm.commit();
         }
         catch (Exception e)
         {
            throw new AuthException(e.getLocalizedMessage());
         }
      }
      else
      {
         return validate(clientSubject) ? AuthStatus.SUCCESS : AuthStatus.FAILURE;
View Full Code Here

      //Custom check: Check that the source of the response and the recipient
      // of the response have identical credentials
      Set sourceSet = source.getPrincipals(SimplePrincipal.class);
      Set recipientSet = recipient.getPrincipals(SimplePrincipal.class);
      if(sourceSet == null && recipientSet == null)
         throw new AuthException("Principals are null");
      if(sourceSet.size() != recipientSet.size())
         throw new AuthException("Principals size are different");
      return AuthStatus.SUCCESS;
   }
View Full Code Here

            getLc();
            ejbClient = new JNDIClient(config.getProviderUrl());
            loginEJB = (JaasEjb) ejbClient.lookup(config.getJndi());
        } catch (LoginException ex) {
            LOGGER.log(Level.SEVERE, "Exception d''init SAM{0}", ex.toString());
            AuthException ae = new AuthException();
            ae.initCause(ex);
            throw ae;
        }
    }
View Full Code Here

TOP

Related Classes of javax.security.auth.message.AuthException

Copyright © 2018 www.massapicom. 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.