Skip to content

Commit

Permalink
decode JWT started
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwechner committed Nov 3, 2017
1 parent 714ec20 commit ee0c0ee
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -258,10 +258,19 @@ public boolean isTrusted(final java.security.cert.X509Certificate[] chain, Strin
private Payload getPayload(String id_token) {
// TODO: Analyze JWT, e.g. get unique user Id and user email and ... see https://developers.google.com/identity/protocols/OpenIDConnect#obtainuserinfo
log.warn("TODO: Decode id_token '" + id_token + "' ....");
String jwtBodyJSon = decodeJWT(id_token);
Payload payload = new Payload("10769150350006150715113082367", "michaelwechner@gmail.com");
return payload;
}

/**
* Decode JWT
* @return decoded JWT as JSON
*/
private String decodeJWT(String jwt) {
return "{\"sub\":\"test\"}";
}

/**
* @see org.wyona.yanel.core.api.attributes.ViewableV2#getViewDescriptors()
*/
Expand Down

0 comments on commit ee0c0ee

Please sign in to comment.