Package us.monoid.web

Examples of us.monoid.web.JSONResource


      json.put("client_secret", properties.get("auth0.client_secret"));
      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


    Resty resty = createResty();

    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

Related Classes of us.monoid.web.JSONResource

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.