Package java.security

Examples of java.security.Principal


      response.sendError(503 ,"JMX is not enabled, unable to use cipango console. Please start Cipango with:\n" +
      "\tjava -jar start.jar --ini=start-cipango.ini --pre=etc/cipango-jmx.xml");
      return;
    }
   
    Principal principal = request.getUserPrincipal();
    if (principal != null && !principal.equals(request.getSession().getAttribute(Principal.class.getName())))
    {   
      _logger.info("User " + principal.getName() + " has logged in console");
      request.getSession().setAttribute(Principal.class.getName(), principal);
    }
   
    Menu menuPrinter = getMenuFactory().getMenu(command, request.getContextPath());
    try
View Full Code Here


        // yukky hack to try and force JBoss to actually
        // flush the user from the jaas security manager's cache therefore
        // forcing logincontext.logout() to be called
        try
        {
            Principal pUser = user;
            if (user instanceof JBossUserPrincipal)
                pUser = ((JBossUserPrincipal) user)._principal;

            java.util.ArrayList servers = MBeanServerFactory.findMBeanServer(null);
            if (servers.size() != 1)
View Full Code Here

   * @param request the servlet request to test
   */
  @Override
  public boolean isMatch(HttpServletRequest request)
  {
    Principal user = request.getUserPrincipal();
   
    if (user == null)
      return false;
   
    for (String role : _roles) {
View Full Code Here

    isAuthorized(HttpServletRequest request,
                 HttpServletResponse response,
                 ServletContext application)
    throws ServletException, IOException
  {
    Principal user = request.getUserPrincipal();

    if (user == null)
      return AuthorizationResult.DENY;
   
    for (int i = 0; _roles != null && i < _roles.length; i++) {
View Full Code Here

                         HttpServletResponse response,
                         ServletContext application,
                         String user, String password)
    throws ServletException
  {
    Principal result = null;

    for (ServletAuthenticator authenticator : _authenticators) {
      result = authenticator.login( request,
                                    response,
                                    application,
View Full Code Here

  public Principal getUserPrincipal(HttpServletRequest request,
                                    HttpServletResponse response,
                                    ServletContext application)
    throws ServletException
  {
    Principal result = null;

    for (ServletAuthenticator authenticator : _authenticators) {
      result = authenticator.getUserPrincipal( request,
                                               response,
                                               application );
View Full Code Here

                               String nonce, String uri,
                               String qop, String nc, String cnonce,
                               byte []clientDigset)
    throws ServletException
  {
    Principal result = null;

    for (ServletAuthenticator authenticator : _authenticators) {
      result = authenticator.loginDigest( request,
                                          response,
                                          app,
View Full Code Here

    ServletContext webApp = request.getServletContext();
    HttpServletResponse response
      = (HttpServletResponse) ((CauchoRequest) request).getServletResponse();

    try {
      Principal user = getUserPrincipal(request, response, webApp);

      if (user != null)
        return user;
     
      return login(request, response, webApp, userName, password);
View Full Code Here

                                HttpServletResponse response,
                                ServletContext app,
                                String userName, String password)
    throws ServletException
  {
    Principal user = getUserPrincipal(request, response, app);

    if (user == null)
      user = login(request, response, app);

    return user;
View Full Code Here

    HttpServletResponse res = (HttpServletResponse) response;

    WebApp webApp = (WebApp) getServletContext();
    FormLogin login = getFormLogin(webApp.getLogin());

    Principal user = login.login(req, res, true);

    if (log.isLoggable(Level.FINE))
      log.fine(this + " login " + user + " using " + login);

    if (res.isCommitted())
View Full Code Here

TOP

Related Classes of java.security.Principal

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.