@Test(expected = ClaimsRequestSyntaxException.class) public void shouldNotResolveClaimsRequest() throws ClaimsRequestSyntaxException { String claims = "no_json"; claimsRequestResolver.resolve(claims); }
public ClaimsRequest resolve(String claims) throws ClaimsRequestSyntaxException { try { JsonObject claimsValue = new JsonObject(claims); ClaimsRequest claimsRequest = new ClaimsRequest(); claimsRequest.setUserInfoClaims(resolveClaimsRequest(claimsValue, ClaimsRequest.USERINFO)); claimsRequest.setIdTokenClaims(resolveClaimsRequest(claimsValue, ClaimsRequest.ID_TOKEN)); return claimsRequest; } catch (Exception e) { throw new ClaimsRequestSyntaxException(e); } }
ClaimsRequestResolver { public ClaimsRequest resolve(String claims) throws ClaimsRequestSyntaxException { try { JsonObject claimsValue = new JsonObject(claims); ClaimsRequest claimsRequest = new ClaimsRequest(); claimsRequest.setUserInfoClaims(resolveClaimsRequest(claimsValue, ClaimsRequest.USERINFO)); claimsRequest.setIdTokenClaims(resolveClaimsRequest(claimsValue, ClaimsRequest.ID_TOKEN)); return claimsRequest; } catch (Exception e) { throw new ClaimsRequestSyntaxException(e); } } }
ClaimsRequestResolver { public ClaimsRequest resolve(String claims) throws ClaimsRequestSyntaxException { try { JsonObject claimsValue = new JsonObject(claims); ClaimsRequest claimsRequest = new ClaimsRequest(); claimsRequest.setUserInfoClaims(resolveClaimsRequest(claimsValue, ClaimsRequest.USERINFO)); claimsRequest.setIdTokenClaims(resolveClaimsRequest(claimsValue, ClaimsRequest.ID_TOKEN)); return claimsRequest; } catch (Exception e) { throw new ClaimsRequestSyntaxException(e); } }  }
ClaimsRequestResolver { public ClaimsRequest resolve(String claims) throws ClaimsRequestSyntaxException { try { JsonObject claimsValue = new JsonObject(claims); ClaimsRequest claimsRequest = new ClaimsRequest(); claimsRequest.setUserInfoClaims(resolveClaimsRequest(claimsValue, ClaimsRequest.USERINFO)); claimsRequest.setIdTokenClaims(resolveClaimsRequest(claimsValue, ClaimsRequest.ID_TOKEN)); return claimsRequest; } catch (Exception e) { throw new ClaimsRequestSyntaxException(e); } }  ClaimsRequest resolve(String claims); }
ClaimsRequestResolver { public ClaimsRequest resolve(String claims) throws ClaimsRequestSyntaxException { try { JsonObject claimsValue = new JsonObject(claims); ClaimsRequest claimsRequest = new ClaimsRequest(); claimsRequest.setUserInfoClaims(resolveClaimsRequest(claimsValue, ClaimsRequest.USERINFO)); claimsRequest.setIdTokenClaims(resolveClaimsRequest(claimsValue, ClaimsRequest.ID_TOKEN)); return claimsRequest; } catch (Exception e) { throw new ClaimsRequestSyntaxException(e); } }  ClaimsRequest resolve(String claims);  }