Package org.jboss.seam.security

Examples of org.jboss.seam.security.Identity.authenticate()


                ids.getCredentials().setUsername(username);
                ids.getCredentials().setPassword(password);
            }

            try {
                ids.authenticate();
                return null;
            } catch (LoginException e) {
                throw new WebApplicationException(getErrorResponse());
            }
        } else {
View Full Code Here


        Identity ids = Identity.instance();
        ids.getCredentials().setUsername(usr);
        ids.getCredentials().setPassword(pwd);
       
        try {
            ids.authenticate();
        } catch (LoginException e) {
            throw new ServletException(new IllegalArgumentException("Unable to authenticate user."));
        }
       
        log.debug("Successful login");
View Full Code Here

     */
    private String checkAutoLogin() {
        Identity id = Identity.instance();
        id.getCredentials().setUsername( GUEST_LOGIN );
        try {
            id.authenticate();
        } catch ( LoginException e ) {
            return null;
        }
        if ( id.isLoggedIn() ) {
            return id.getCredentials().getUsername();
View Full Code Here

                pwd = a[1];
                ids.getCredentials().setUsername( usr );
                ids.getCredentials().setPassword( pwd );
            }
            try {
                ids.authenticate();
                log.info( usr + " authenticated for rest api" );

                return true;
            } catch ( LoginException e ) {
                log.warn( "Unable to authenticate for rest api: " + usr );
View Full Code Here

        Identity ids = Identity.instance();
        ids.getCredentials().setUsername(usr);
        ids.getCredentials().setPassword(pwd);
       
        try {
            ids.authenticate();
        } catch (LoginException e) {
            throw new ServletException(new IllegalArgumentException("Unable to authenticate user."));
        }
       
        log.debug("Successful login");
View Full Code Here

     */
    private String checkAutoLogin() {
        Identity id = Identity.instance();
        id.getCredentials().setUsername( GUEST_LOGIN );
        try {
            id.authenticate();
        } catch ( LoginException e ) {
            return null;
        }
        if ( id.isLoggedIn() ) {
            return id.getCredentials().getUsername();
View Full Code Here

                pwd = a[1];
                ids.getCredentials().setUsername(usr);
                ids.getCredentials().setPassword(pwd);
            }
            try {
                ids.authenticate();
                log.info(usr + " authenticated for rest api");
              
                return true;
            } catch (LoginException e) {
                log.warn("Unable to authenticate for rest api: " + usr);
View Full Code Here

                ids.getCredentials().setUsername(username);
                ids.getCredentials().setPassword(password);
            }

            try {
                ids.authenticate();
                return null;
            } catch (LoginException e) {
                e.printStackTrace();
                throw new WebApplicationException(getErrorResponse());
            }
View Full Code Here

                pwd = a[1];
                ids.getCredentials().setUsername(usr);
                ids.getCredentials().setPassword(pwd);
            }
            try {
                ids.authenticate();
                log.info(usr + " authenticated for rest api");

                return true;
            } catch (LoginException e) {
                log.warn("Unable to authenticate for rest api: " + usr);
View Full Code Here

        Identity ids = Identity.instance();
        ids.getCredentials().setUsername(usr);
        ids.getCredentials().setPassword(pwd);

        try {
            ids.authenticate();
        } catch (LoginException e) {
            throw new ServletException(new IllegalArgumentException("Unable to authenticate user."));
        }

        log.debug("Successful login");
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.