Package org.pac4j.gae.profile

Examples of org.pac4j.gae.profile.GaeUserServiceProfile.addAttribute()


  protected GaeUserServiceProfile retrieveUserProfile(GaeUserCredentials credentials, WebContext context) {
    User user = credentials.getUser();
    if (user != null) {
      GaeUserServiceProfile gaeUserProfile = new GaeUserServiceProfile();
      gaeUserProfile.setId(user.getEmail());
      gaeUserProfile.addAttribute(GaeUserServiceAttributesDefinition.EMAIL, user.getEmail());
      gaeUserProfile.addAttribute(GaeUserServiceAttributesDefinition.DISPLAYNAME, user.getNickname());
      if (service.isUserAdmin()) {
        gaeUserProfile.addRole(GaeUserServiceProfile.PAC4J_GAE_GLOBAL_ADMIN_ROLE);
      }
      return gaeUserProfile;
View Full Code Here


    User user = credentials.getUser();
    if (user != null) {
      GaeUserServiceProfile gaeUserProfile = new GaeUserServiceProfile();
      gaeUserProfile.setId(user.getEmail());
      gaeUserProfile.addAttribute(GaeUserServiceAttributesDefinition.EMAIL, user.getEmail());
      gaeUserProfile.addAttribute(GaeUserServiceAttributesDefinition.DISPLAYNAME, user.getNickname());
      if (service.isUserAdmin()) {
        gaeUserProfile.addRole(GaeUserServiceProfile.PAC4J_GAE_GLOBAL_ADMIN_ROLE);
      }
      return gaeUserProfile;
    }
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.