Package us.monoid.web

Examples of us.monoid.web.JSONResource.toObject()


      json.put("redirect_uri", req.getRequestURL().toString());
      json.put("grant_type", "authorization_code");
      json.put("code", authorizationCode);

      JSONResource tokenInfo = resty.json(tokenUri, content(json));
      return new Tokens(tokenInfo.toObject());

    } catch (Exception ex) {
      throw new IllegalStateException("Cannot get Token from Auth0", ex);
    }
  }
View Full Code Here


    String userInfoUri = getUserInfoUri(tokens.getAccessToken());

    try {
      JSONResource json = resty.json(userInfoUri);
      return new Auth0User(json.toObject());
    } catch (Exception ex) {
      throw new IllegalStateException("Cannot get User from Auth0", ex);
    }
  }
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.