Package javax.security.auth.message

Examples of javax.security.auth.message.AuthException


      //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


            response.setHeader("Location", url);
            response.setStatus(HttpServletResponse.SC_TEMPORARY_REDIRECT);

        } catch (Exception e) {
            LOGGER.warning("error_redirecting_to " + url);
            AuthException ae = new AuthException();
            ae.initCause(e);
            throw ae;
        }
    }
View Full Code Here

        try {
            lc.logout();


        } catch (LoginException ex) {
            AuthException ae = new AuthException();
            ae.initCause(ex);


            throw ae;

View Full Code Here

            response.addHeader("Pragma", "No-Cache");
            response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
            response.sendRedirect(response.encodeRedirectURL(url));
        } catch (IOException ioe) {
            LOGGER.log(Level.WARNING, "jmac.servlet_redirect_failed", ioe);
            AuthException ae = new AuthException();
            ae.initCause(ioe);
            throw ae;
        }
        return AuthStatus.SEND_CONTINUE;
    }
View Full Code Here

         acp = (AuthConfigProvider)ctr.newInstance(new Object[] {properties});
      }
      catch(Exception e)
      {
        log.error("Cannot register provider:"+className+":",e);
        throw new AuthException("Cannot register Provider "+ className + ":reason="+e);
      }
     
      return this.registerConfigProvider(acp, layer, appContext, description);
   }
View Full Code Here

                  modules.add(this.createSAM(ame.getAuthModuleName(),
                        ame.getLoginModuleStackHolderName()));
               }
               catch (Exception e)
               {
                  throw new AuthException(e.getLocalizedMessage());
               }
            }
            else
            {
               try
               {
                  mapOptionsByName.put(ame.getAuthModuleName(), ame.getOptions());
                  modules.add(this.createSAM(ame.getAuthModuleName()));
               }
               catch (Exception e)
               {
                  throw new AuthException(e.getLocalizedMessage());
               }
            }
         }
      }
      
View Full Code Here

             handler = this.instantiateCallbackHandler()
         }
         catch(Exception e)
         {
            log.error("Exception in instantiating callback handler:",e);
            throw new AuthException(e.getMessage());
         }
      }
     
        
      return new JBossClientAuthConfig(layer,appContext, handler, contextProperties);
View Full Code Here

             handler = this.instantiateCallbackHandler()
         }
         catch(Exception e)
         {
            log.error("Exception in instantiating callback handler:",e);
            throw new AuthException(e.getMessage());
         }
      }
      return new JBossServerAuthConfig(layer,appContext, handler, contextProperties);
   }
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

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.