Skip to content

Commit d82676d

Browse files
The entity configuration endpoint to include metadata of both "openid_provider" and "openid_credential_issuer".
1 parent 2fd2a40 commit d82676d

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<properties>
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1414

15-
<authlete.java.common.version>3.80</authlete.java.common.version>
15+
<authlete.java.common.version>3.81</authlete.java.common.version>
1616
<authlete.java.jaxrs.version>2.65</authlete.java.jaxrs.version>
1717
<javax.servlet-api.version>3.0.1</javax.servlet-api.version>
1818
<jersey.version>2.30.1</jersey.version>

src/main/java/com/authlete/jaxrs/server/api/FederationConfigurationEndpoint.java

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2022 Authlete, Inc.
2+
* Copyright (C) 2022-2023 Authlete, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,6 +21,8 @@
2121
import javax.ws.rs.Path;
2222
import javax.ws.rs.core.Response;
2323
import com.authlete.common.api.AuthleteApiFactory;
24+
import com.authlete.common.dto.FederationConfigurationRequest;
25+
import com.authlete.common.types.EntityType;
2426
import com.authlete.jaxrs.BaseFederationConfigurationEndpoint;
2527

2628

@@ -29,7 +31,7 @@
2931
*
3032
* <p>
3133
* An OpenID Provider that supports <a href=
32-
* "https://openid.net/specs/openid-connect-federation-1_0.html">OpenID Connect
34+
* "https://openid.net/specs/openid-federation-1_0.html">OpenID
3335
* Federation 1.0</a> must provide an endpoint that returns its <b>entity
3436
* configuration</b> in the JWT format. The URI of the endpoint is defined
3537
* as follows:
@@ -45,26 +47,37 @@
4547
* <p>
4648
* <b>Entity ID</b> is a URL that identifies an OpenID Provider (and other
4749
* entities including Relying Parties, Trust Anchors and Intermediate
48-
* Authorities) in the context of OpenID Connect Federation 1.0.
50+
* Authorities) in the context of OpenID Federation 1.0.
4951
* </p>
5052
*
5153
* <p>
52-
* Note that OpenID Connect Federation 1.0 is supported since Authlete 2.3.
54+
* Note that OpenID Federation 1.0 is supported since Authlete 2.3.
5355
* </p>
5456
*
55-
* @see <a href="https://openid.net/specs/openid-connect-federation-1_0.html"
56-
* >OpenID Connect Federation 1.0</a>
57+
* @see <a href="https://openid.net/specs/openid-federation-1_0.html"
58+
* >OpenID Federation 1.0</a>
5759
*/
5860
@Path("/.well-known/openid-federation")
5961
public class FederationConfigurationEndpoint extends BaseFederationConfigurationEndpoint
6062
{
63+
/**
64+
* The request to Authlete's /federation/configuration API.
65+
*/
66+
private static final FederationConfigurationRequest REQUEST =
67+
new FederationConfigurationRequest()
68+
.setEntityTypes(new EntityType[] {
69+
EntityType.OPENID_PROVIDER,
70+
EntityType.OPENID_CREDENTIAL_ISSUER
71+
});
72+
73+
6174
/**
6275
* Entity configuration endpoint.
6376
*/
6477
@GET
6578
public Response get()
6679
{
6780
// Handle the request to the endpoint.
68-
return handle(AuthleteApiFactory.getDefaultApi());
81+
return handle(AuthleteApiFactory.getDefaultApi(), REQUEST);
6982
}
7083
}

0 commit comments

Comments
 (0)