Examples of NewUserInfo


Examples of ch.inftec.ju.db.auth.UnknownUserHandler.NewUserInfo

    }
   
    if (authUser == null) {
      if (this.unknownUserHandler != null) {
        // Check whether the user should be added
        NewUserInfo newUserInfo = this.unknownUserHandler.handleUser(username);
        if (newUserInfo != null) {
          if (!noDbConn) {
            // Create the user on the DB
            authUser = this.authenticationEditorModel.addUser(username, newUserInfo.getPassword(), newUserInfo.getAuthorities());
          } else {
            // No DB connectivity, so just return user as defined by UnknownUserHandler
            newUserInfo.getAuthorities();
           
            List<GrantedAuthority> grantedAuths = new ArrayList<>();
            for (String role : newUserInfo.getAuthorities()) {
              grantedAuths.add(new SimpleGrantedAuthority(role));
            }
            return new User(username, newUserInfo.getPassword(), grantedAuths);           
          }
        }
      }
     
      if (authUser == null) {
View Full Code Here

Examples of ch.inftec.ju.db.auth.UnknownUserHandler.NewUserInfo

    AuthUser authUser = this.authenticationEditorModel.getUser(username);
   
    if (authUser == null) {
      if (this.unknownUserHandler != null) {
        // Check whether the user should be added
        NewUserInfo newUserInfo = this.unknownUserHandler.handleUser(username);
        if (newUserInfo != null) {
          // Create the user
          authUser = this.authenticationEditorModel.addUser(username, newUserInfo.getPassword(), newUserInfo.getAuthorities());
        }
      }
     
      if (authUser == null) {
        throw new UsernameNotFoundException("No such user: " + username);
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.