Пример #1
0
 @Test
 public void testClientId() {
   Claims result = endpoint.checkToken(accessToken.getValue());
   assertEquals("client", result.getAzp());
   assertEquals("client", result.getCid());
   assertEquals("client", result.getClientId());
 }
Пример #2
0
 @Test
 public void testClientOnly() {
   authentication =
       new OAuth2Authentication(
           new AuthorizationRequest("client", Collections.singleton("scim.read"))
               .createOAuth2Request(),
           null);
   accessToken = tokenServices.createAccessToken(authentication);
   Claims result = endpoint.checkToken(accessToken.getValue());
   assertEquals("client", result.getClientId());
   assertEquals("client", result.getUserId());
 }