Package org.hoteia.tools.scribe.mapping.oauth.windowslive.json.pojo

Examples of org.hoteia.tools.scribe.mapping.oauth.windowslive.json.pojo.UserPojo


    return null;
  }
 
  protected void handleAuthenticationData(HttpServletRequest request, HttpServletResponse response, RequestData requestData, OAuthType type, String jsonData) throws Exception {
    UserPojo userPojo = null;
    try {
      userPojo = jsonMapper.getJsonMapper().readValue(jsonData, UserPojo.class);
    } catch (JsonGenerationException e) {
      logger.error(e.getMessage());
    } catch (JsonMappingException e) {
      logger.error(e.getMessage());
    }
    if(userPojo != null){
      final String email = userPojo.getEmails().getPreferred();
      final String firstName = userPojo.getFirstName();
      final String lastName = userPojo.getLastName();
      final String gender = userPojo.getGender();
      final String locale = userPojo.getLocale();
      Customer customer = customerService.getCustomerByLoginOrEmail(email);
     
      if(customer == null){
        // CREATE A NEW CUSTOMER
        customer = new Customer();
View Full Code Here

TOP

Related Classes of org.hoteia.tools.scribe.mapping.oauth.windowslive.json.pojo.UserPojo

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.