Package org.acegisecurity.userdetails

Examples of org.acegisecurity.userdetails.UserDetails


                if (password == null) {
                    throw new BadCredentialsException("No password specified");
                }

                UserDetails d = AbstractPasswordBasedSecurityRealm.this.doAuthenticate(userName, password);
                return new UsernamePasswordAuthenticationToken(d, password, d.getAuthorities());
            }
        };
    }
View Full Code Here


     * attempt.
     * If authentication was successful - HUDSON_USER environment variable will be set
     * <a href='http://issues.hudson-ci.org/browse/HUDSON-4463'>HUDSON-4463</a>
     */
    protected UserDetails doAuthenticate(String username, String password) throws AuthenticationException {
        UserDetails userDetails = authenticate(username, password);
        EnvVars.setHudsonUserEnvVar(userDetails.getUsername());
        return userDetails;
    }
View Full Code Here

    if (!(oPrincipal instanceof UserDetails)) {
      log.warn("Unsupported Principal type in Authentication. Skipping auto-registration.");
      return null;
    }
   
    UserDetails userDetails = (UserDetails) oPrincipal;
   
    String userName = userDetails.getUsername();
    String password = userDetails.getPassword();
    boolean enabled = userDetails.isEnabled();

    UserData ud = new UserData();
    ud.setId(null);
    ud.setUserName(userName);
   
View Full Code Here

         */
        public User signin() throws UnclaimedIdentityException {
            User u = locateUser();
            if (u!=null) {
                // login as this user
                UserDetails d = Hudson.getInstance().getSecurityRealm().loadUserByUsername(u.getId());

                UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(d,"",d.getAuthorities());
                token.setDetails(d);
                SecurityContextHolder.getContext().setAuthentication(token);
                return u;
            } else {
                // Unassociated identity.
View Full Code Here

TOP

Related Classes of org.acegisecurity.userdetails.UserDetails

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.