291 if (!baseUrl.endsWith(
"/")) {
292 logger.debug(
"Configured issuer doesn't end in /, adding for discovery: {}", baseUrl);
293 baseUrl = baseUrl.concat(
"/");
297 Lists.newArrayList(JWSAlgorithm.HS256, JWSAlgorithm.HS384, JWSAlgorithm.HS512);
298 Collection<JWSAlgorithm> clientSymmetricAndAsymmetricSigningAlgs = Lists.newArrayList(JWSAlgorithm.HS256, JWSAlgorithm.HS384, JWSAlgorithm.HS512,
299 JWSAlgorithm.RS256, JWSAlgorithm.RS384, JWSAlgorithm.RS512,
300 JWSAlgorithm.ES256, JWSAlgorithm.ES384, JWSAlgorithm.ES512,
301 JWSAlgorithm.PS256, JWSAlgorithm.PS384, JWSAlgorithm.PS512);
302 Collection<Algorithm> clientSymmetricAndAsymmetricSigningAlgsWithNone = Lists.newArrayList(JWSAlgorithm.HS256, JWSAlgorithm.HS384, JWSAlgorithm.HS512,
303 JWSAlgorithm.RS256, JWSAlgorithm.RS384, JWSAlgorithm.RS512,
304 JWSAlgorithm.ES256, JWSAlgorithm.ES384, JWSAlgorithm.ES512,
305 JWSAlgorithm.PS256, JWSAlgorithm.PS384, JWSAlgorithm.PS512,
307 ArrayList<String> grantTypes = Lists.newArrayList(
"authorization_code",
"implicit",
"urn:ietf:params:oauth:grant-type:jwt-bearer",
"client_credentials",
"urn:ietf:params:oauth:grant_type:redelegate",
"urn:ietf:params:oauth:grant-type:device_code");
309 Map<String, Object> m =
new HashMap<>();
311 m.put(
"authorization_endpoint", baseUrl +
"authorize");
312 m.put(
"token_endpoint", baseUrl +
"token");
313 m.put(
"userinfo_endpoint", baseUrl + UserInfoEndpoint.URL);
315 m.put(
"end_session_endpoint", baseUrl + EndSessionEndpoint.URL);
316 m.put(
"jwks_uri", baseUrl + JWKSetPublishingEndpoint.URL);
317 m.put(
"registration_endpoint", baseUrl + DynamicClientRegistrationEndpoint.URL);
319 m.put(
"response_types_supported", Lists.newArrayList(
"code",
"token"));
320 m.put(
"grant_types_supported", grantTypes);
322 m.put(
"subject_types_supported", Lists.newArrayList(
"public",
"pairwise"));
323 m.put(
"userinfo_signing_alg_values_supported", Collections2.transform(clientSymmetricAndAsymmetricSigningAlgs,
toAlgorithmName));
326 m.put(
"id_token_signing_alg_values_supported", Collections2.transform(clientSymmetricAndAsymmetricSigningAlgsWithNone,
toAlgorithmName));
329 m.put(
"request_object_signing_alg_values_supported", Collections2.transform(clientSymmetricAndAsymmetricSigningAlgs,
toAlgorithmName));
332 m.put(
"token_endpoint_auth_methods_supported", Lists.newArrayList(
"client_secret_post",
"client_secret_basic",
"client_secret_jwt",
"private_key_jwt",
"none"));
333 m.put(
"token_endpoint_auth_signing_alg_values_supported", Collections2.transform(clientSymmetricAndAsymmetricSigningAlgs,
toAlgorithmName));
335 m.put(
"claim_types_supported", Lists.newArrayList(
"normal" ));
336 m.put(
"claims_supported", Lists.newArrayList(
339 "preferred_username",
355 "phone_number_verified",
358 m.put(
"service_documentation", baseUrl +
"about");
361 m.put(
"claims_parameter_supported",
false);
362 m.put(
"request_parameter_supported",
true);
363 m.put(
"request_uri_parameter_supported",
false);
364 m.put(
"require_request_uri_registration",
false);
365 m.put(
"op_policy_uri", baseUrl +
"about");
366 m.put(
"op_tos_uri", baseUrl +
"about");
368 m.put(
"introspection_endpoint", baseUrl + IntrospectionEndpoint.URL);
369 m.put(
"revocation_endpoint", baseUrl + RevocationEndpoint.URL);
371 m.put(
"code_challenge_methods_supported", Lists.newArrayList(PKCEAlgorithm.plain.getName(), PKCEAlgorithm.S256.getName()));
373 m.put(
"device_authorization_endpoint", baseUrl + DeviceEndpoint.URL);
375 model.addAttribute(JsonEntityView.ENTITY, m);
377 return JsonEntityView.VIEWNAME;
static final Logger logger
Definition: DiscoveryEndpoint.java:78
Collection< JWSAlgorithm > getAllSigningAlgsSupported()
Collection< EncryptionMethod > getAllEncryptionEncsSupported()
ConfigurationPropertiesBean config
Definition: DiscoveryEndpoint.java:81
JWTSigningAndValidationService signService
Definition: DiscoveryEndpoint.java:87
SystemScopeService scopeService
Definition: DiscoveryEndpoint.java:84
Collection< JWEAlgorithm > getAllEncryptionAlgsSupported()
Set< SystemScope > getUnrestricted()
Function< Algorithm, String > toAlgorithmName
Definition: DiscoveryEndpoint.java:97
Set< String > toStrings(Set< SystemScope > scope)
String getIssuer()
Definition: ConfigurationPropertiesBean.java:100
JWTEncryptionAndDecryptionService encService
Definition: DiscoveryEndpoint.java:90