This is an automated email from the ASF dual-hosted git repository. rmannibucau pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openwebbeans-meecrowave.git
The following commit(s) were added to refs/heads/master by this push: new bd2f494 make it simpler to customize the jwt by making the callbacks in oauth2configurer overridable bd2f494 is described below commit bd2f4941372d65403e27d7d245fd81bedd730395 Author: Romain Manni-Bucau <rmannibu...@gmail.com> AuthorDate: Tue Nov 10 17:52:10 2020 +0100 make it simpler to customize the jwt by making the callbacks in oauth2configurer overridable --- .../meecrowave/oauth2/configuration/OAuth2Configurer.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meecrowave-oauth2-minimal/src/main/java/org/apache/meecrowave/oauth2/configuration/OAuth2Configurer.java b/meecrowave-oauth2-minimal/src/main/java/org/apache/meecrowave/oauth2/configuration/OAuth2Configurer.java index 94f9865..f5871ce 100644 --- a/meecrowave-oauth2-minimal/src/main/java/org/apache/meecrowave/oauth2/configuration/OAuth2Configurer.java +++ b/meecrowave-oauth2-minimal/src/main/java/org/apache/meecrowave/oauth2/configuration/OAuth2Configurer.java @@ -463,21 +463,21 @@ public class OAuth2Configurer { return userSubject; } - private void forwardRolesAsClaims(final UserSubject subject) { + protected void forwardRolesAsClaims(final UserSubject subject) { if (configuration.isForwardRoleAsJwtClaims() && subject.getRoles() != null) { subject.setProperties(new HashMap<>()); subject.getProperties().put("claim.roles", String.join(", ", subject.getRoles())); } } - private void forwardClaims(final Client client, final UserSubject subject, - final ServerAccessToken serverAccessToken) { + protected void forwardClaims(final Client client, final UserSubject subject, + final ServerAccessToken serverAccessToken) { forwardClientClaims(client, serverAccessToken); forwardUserClaims(subject, serverAccessToken); } - private void forwardUserClaims(final UserSubject subject, - final ServerAccessToken serverAccessToken) { + protected void forwardUserClaims(final UserSubject subject, + final ServerAccessToken serverAccessToken) { if (subject.getProperties() == null || subject.getProperties().isEmpty()) { return; }