Package javax.security.auth.message

Examples of javax.security.auth.message.AuthException


         }
              
      }
      catch (Exception e)
      {
         throw new AuthException(e.getLocalizedMessage());
      }
      return true;
   }
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

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

                  sam.initialize(null, null, callbackHandler, options);
                  modules.add(sam);
               }
               catch (Exception e)
               {
                  throw new AuthException(e.getLocalizedMessage());
               }
            }
            else
            {
               try
               {
                  mapOptionsByName.put(ame.getAuthModuleName(), ame.getOptions());
                  controlFlags.add(ame.getControlFlag());            
                  ServerAuthModule sam = this.createSAM(ame.getAuthModuleName());
                 
                  Map options = new HashMap();
                  sam.initialize(null, null, callbackHandler, options);
                  modules.add(sam);
               }
               catch (Exception e)
               {
                  throw new AuthException(e.getLocalizedMessage());
               }
            }
         }
      }
      
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

             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

            response.sendError(HttpServletResponse.SC_FORBIDDEN, "The provided client certificate does not correspond to a trusted user.");
            return AuthStatus.SEND_FAILURE;
        }
        catch (IOException e)
        {
            throw new AuthException(e.getMessage());
        }
        catch (UnsupportedCallbackException e)
        {
            throw new AuthException(e.getMessage());
        }

    }
View Full Code Here

            response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
            return AuthStatus.SEND_CONTINUE;
        }
        catch (IOException e)
        {
            throw new AuthException(e.getMessage());
        }
        catch (UnsupportedCallbackException e)
        {
            throw new AuthException(e.getMessage());
        }

    }
View Full Code Here

            response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
            return AuthStatus.SEND_CONTINUE;
        }
        catch (IOException e)
        {
            throw new AuthException(e.getMessage());
        }
        catch (UnsupportedCallbackException e)
        {
            throw new AuthException(e.getMessage());
        }

    }
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.