Package javax.security.auth.message

Examples of javax.security.auth.message.AuthException.initCause()


            if (userId != null) {
                try {
                    setupUser(client, userId);
                } catch (UnsupportedCallbackException uce) {
                    AuthException ae = new AuthException();
                    ae.initCause(uce);
                    throw ae;
                }
            } else if (requestPolicy.isMandatory()) {
                // otherwise, if the login is mandatory, it's a failure, since
                // there was no user id
View Full Code Here


                // there was no user id
                return AuthStatus.SEND_FAILURE;
            }
        } catch (IOException ioe) {
            AuthException ae = new AuthException();
            ae.initCause(ioe);
            throw ae;
        }

        // if we made it this far, we authenticated properly or authentication
        // wasn't required.  Good news!
View Full Code Here

        } catch(Exception e) {
            if (e instanceof AuthException) {
                throw (AuthException)e;
            }
            AuthException ae = new AuthException();
            ae.initCause(e);
            throw ae;
        }
    }

    /**
 
View Full Code Here

                        "jmac.provider_unable_to_load_authmodule",
                        new String [] { moduleClassName, e.toString() });
                }

                AuthException ae = new AuthException();
                ae.initCause(e);
                throw ae;
            }
        }
    }
View Full Code Here

                            }
                        });
                } catch(PrivilegedActionException pae) {
                    Throwable cause = pae.getCause();
                    AuthException aex = new AuthException();
                    aex.initCause(cause);
                    throw aex;
                }
            }
  }
View Full Code Here

            try {
                RestUtil.initialize(null);
                rd.forward(request, response);
            } catch (Exception ex) {
                AuthException ae = new AuthException();
                ae.initCause(ex);
                throw ae;
            }
            return AuthStatus.SEND_CONTINUE;
        }
View Full Code Here

                    new CallerPrincipalCallback(clientSubject, username);
            try {
                handler.handle(new Callback[]{ /*pwdCallback,*/cpCallback});
            } catch (Exception ex) {
                AuthException ae = new AuthException();
                ae.initCause(ex);
                throw ae;
            }

            // recreate the session
            Map<String, Object> map = new HashMap<String, Object>();
View Full Code Here

                }
                logger.log(Level.INFO, "Redirecting to {0}", origRequest);
                response.sendRedirect(response.encodeRedirectURL(origRequest));
            } catch (Exception ex) {
                AuthException ae = new AuthException();
                ae.initCause(ex);
                throw ae;
            }

            // Continue...
            return AuthStatus.SEND_CONTINUE;
View Full Code Here

            RequestDispatcher rd = request.getRequestDispatcher(this.loginErrorPage);
            try {
                rd.forward(request, response);
            } catch (Exception ex) {
                AuthException ae = new AuthException();
                ae.initCause(ex);
                throw ae;
            }
            return AuthStatus.SEND_FAILURE;
        }
    }
View Full Code Here

            RequestDispatcher rd = request.getRequestDispatcher(loginPage);
            try {
                rd.forward(request, response);
            } catch (Exception ex) {
                AuthException ae = new AuthException();
                ae.initCause(ex);
                throw ae;
            }
            return AuthStatus.SEND_CONTINUE;
        }
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.