Skip to content

Commit

Permalink
Merge pull request #149 from orchitech/revocation-endpoint-in-well-known
Browse files Browse the repository at this point in the history
Add OAuth2 revocation_endpoint to .well-known
  • Loading branch information
pavelhoral authored Aug 23, 2023
2 parents a1f7c74 + 537caf2 commit 84fbda8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*
* Copyright 2014-2015 ForgeRock AS.
* Portions Copyrighted 2015 Nomura Research Institute, Ltd.
* Portions Copyrighted 2023 Wren Security
*/

package org.forgerock.oauth2.core;
Expand Down Expand Up @@ -107,4 +108,11 @@ public interface OAuth2Uris {
*/
String getResourceSetRegistrationEndpoint();

/**
* Gets the URI for the OAuth2 token revocation endpoint.
*
* @return The URL.
*/
String getRevocationEndpoint();

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014-2016 ForgeRock AS.
* Portions copyright 2023 Wren Security
*/

package org.forgerock.openam.oauth2;
Expand Down Expand Up @@ -169,6 +170,11 @@ public String getResourceSetRegistrationEndpoint() {
return baseUrl + "/resource_set";
}

@Override
public String getRevocationEndpoint() {
return baseUrl + "/token/revoke";
}

@Override
public String getUserInfoEndpoint() {
return baseUrl + "/userinfo";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014-2017 ForgeRock AS.
* Portions copyright 2023 Wren Security
*/

package org.forgerock.openidconnect;
Expand Down Expand Up @@ -101,6 +102,7 @@ public JsonValue getConfiguration(OAuth2Request request) throws OAuth2Exception
configuration.put("claims_parameter_supported", providerSettings.getClaimsParameterSupported());
configuration.put("token_endpoint_auth_methods_supported", providerSettings.getEndpointAuthMethodsSupported());
configuration.put("introspection_endpoint", uris.getIntrospectionEndpoint());
configuration.put("revocation_endpoint", uris.getRevocationEndpoint());

return new JsonValue(configuration);
}
Expand Down

0 comments on commit 84fbda8

Please sign in to comment.