Search in sources :

Example 1 with JSONResource

use of us.monoid.web.JSONResource in project nextprot-api by calipho-sib.

the class NextprotAuth0EndpointImpl method fetchUser.

@Cacheable("user-auth")
public Auth0User fetchUser(String accessToken) throws IOException, JSONException {
    Resty resty = new Resty();
    String userInfoUri = getUserInfoUri(accessToken);
    JSONResource json = resty.json(userInfoUri);
    return new Auth0User(json.toObject());
}
Also used : Auth0User(com.auth0.Auth0User) Resty(us.monoid.web.Resty) JSONResource(us.monoid.web.JSONResource) Cacheable(org.springframework.cache.annotation.Cacheable)

Aggregations

Auth0User (com.auth0.Auth0User)1 Cacheable (org.springframework.cache.annotation.Cacheable)1 JSONResource (us.monoid.web.JSONResource)1 Resty (us.monoid.web.Resty)1