274 if (c.getSource() != null) {
276 return c.getSource();
279 JsonObject o =
new JsonObject();
281 o.addProperty(CLIENT_ID, c.getClientId());
282 if (c.getClientSecret() != null) {
283 o.addProperty(CLIENT_SECRET, c.getClientSecret());
285 if (c.getClientSecretExpiresAt() == null) {
286 o.addProperty(CLIENT_SECRET_EXPIRES_AT, 0);
288 o.addProperty(CLIENT_SECRET_EXPIRES_AT, c.getClientSecretExpiresAt().getTime() / 1000L);
292 if (c.getClientIdIssuedAt() != null) {
293 o.addProperty(CLIENT_ID_ISSUED_AT, c.getClientIdIssuedAt().getTime() / 1000L);
294 }
else if (c.getCreatedAt() != null) {
295 o.addProperty(CLIENT_ID_ISSUED_AT, c.getCreatedAt().getTime() / 1000L);
297 if (c.getRegistrationAccessToken() != null) {
298 o.addProperty(REGISTRATION_ACCESS_TOKEN, c.getRegistrationAccessToken());
301 if (c.getRegistrationClientUri() != null) {
302 o.addProperty(REGISTRATION_CLIENT_URI, c.getRegistrationClientUri());
309 o.add(REDIRECT_URIS, getAsArray(c.getRedirectUris()));
310 o.addProperty(CLIENT_NAME, c.getClientName());
311 o.addProperty(CLIENT_URI, c.getClientUri());
312 o.addProperty(LOGO_URI, c.getLogoUri());
313 o.add(CONTACTS, getAsArray(c.getContacts()));
314 o.addProperty(TOS_URI, c.getTosUri());
315 o.addProperty(TOKEN_ENDPOINT_AUTH_METHOD, c.getTokenEndpointAuthMethod() != null ? c.getTokenEndpointAuthMethod().getValue() : null);
316 o.addProperty(SCOPE, c.getScope() != null ? Joiner.on(SCOPE_SEPARATOR).join(c.getScope()) : null);
317 o.add(GRANT_TYPES, getAsArray(c.getGrantTypes()));
318 o.add(RESPONSE_TYPES, getAsArray(c.getResponseTypes()));
319 o.addProperty(POLICY_URI, c.getPolicyUri());
320 o.addProperty(JWKS_URI, c.getJwksUri());
323 if (c.getJwks() != null) {
325 JsonElement jwks =
parser.parse(c.getJwks().toString());
332 o.addProperty(APPLICATION_TYPE, c.getApplicationType() != null ? c.getApplicationType().getValue() : null);
333 o.addProperty(SECTOR_IDENTIFIER_URI, c.getSectorIdentifierUri());
334 o.addProperty(SUBJECT_TYPE, c.getSubjectType() != null ? c.getSubjectType().getValue() : null);
335 o.addProperty(REQUEST_OBJECT_SIGNING_ALG, c.getRequestObjectSigningAlg() != null ? c.getRequestObjectSigningAlg().getName() : null);
336 o.addProperty(USERINFO_SIGNED_RESPONSE_ALG, c.getUserInfoSignedResponseAlg() != null ? c.getUserInfoSignedResponseAlg().getName() : null);
337 o.addProperty(USERINFO_ENCRYPTED_RESPONSE_ALG, c.getUserInfoEncryptedResponseAlg() != null ? c.getUserInfoEncryptedResponseAlg().getName() : null);
338 o.addProperty(USERINFO_ENCRYPTED_RESPONSE_ENC, c.getUserInfoEncryptedResponseEnc() != null ? c.getUserInfoEncryptedResponseEnc().getName() : null);
339 o.addProperty(ID_TOKEN_SIGNED_RESPONSE_ALG, c.getIdTokenSignedResponseAlg() != null ? c.getIdTokenSignedResponseAlg().getName() : null);
340 o.addProperty(ID_TOKEN_ENCRYPTED_RESPONSE_ALG, c.getIdTokenEncryptedResponseAlg() != null ? c.getIdTokenEncryptedResponseAlg().getName() : null);
341 o.addProperty(ID_TOKEN_ENCRYPTED_RESPONSE_ENC, c.getIdTokenEncryptedResponseEnc() != null ? c.getIdTokenEncryptedResponseEnc().getName() : null);
342 o.addProperty(TOKEN_ENDPOINT_AUTH_SIGNING_ALG, c.getTokenEndpointAuthSigningAlg() != null ? c.getTokenEndpointAuthSigningAlg().getName() : null);
343 o.addProperty(DEFAULT_MAX_AGE, c.getDefaultMaxAge());
344 o.addProperty(REQUIRE_AUTH_TIME, c.getRequireAuthTime());
345 o.add(DEFAULT_ACR_VALUES, getAsArray(c.getDefaultACRvalues()));
346 o.addProperty(INITIATE_LOGIN_URI, c.getInitiateLoginUri());
347 o.add(POST_LOGOUT_REDIRECT_URIS, getAsArray(c.getPostLogoutRedirectUris()));
348 o.add(REQUEST_URIS, getAsArray(c.getRequestUris()));
350 o.add(CLAIMS_REDIRECT_URIS, getAsArray(c.getClaimsRedirectUris()));
352 o.addProperty(CODE_CHALLENGE_METHOD, c.getCodeChallengeMethod() != null ? c.getCodeChallengeMethod().getName() : null);
354 o.addProperty(SOFTWARE_ID, c.getSoftwareId());
355 o.addProperty(SOFTWARE_VERSION, c.getSoftwareVersion());
357 if (c.getSoftwareStatement() != null) {
358 o.addProperty(SOFTWARE_STATEMENT, c.getSoftwareStatement().serialize());
static JsonParser parser
Definition: ClientDetailsEntityJsonProcessor.java:107