mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-06-02 01:16:44 +02:00
adding more claims attributes to Keycloak validation
This commit is contained in:
parent
086e4e0e15
commit
d25429748e
@ -9,6 +9,7 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import stirling.software.SPDF.model.UsernameAttribute;
|
import stirling.software.SPDF.model.UsernameAttribute;
|
||||||
import stirling.software.SPDF.model.exception.UnsupportedUsernameAttribute;
|
import stirling.software.SPDF.model.exception.UnsupportedUsernameAttribute;
|
||||||
|
|
||||||
@ -83,7 +84,7 @@ public class Provider {
|
|||||||
private UsernameAttribute validateKeycloakUsernameAttribute(
|
private UsernameAttribute validateKeycloakUsernameAttribute(
|
||||||
UsernameAttribute usernameAttribute) {
|
UsernameAttribute usernameAttribute) {
|
||||||
switch (usernameAttribute) {
|
switch (usernameAttribute) {
|
||||||
case EMAIL, PREFERRED_USERNAME -> {
|
case EMAIL, NAME, GIVEN_NAME, FAMILY_NAME, PREFERRED_USERNAME -> {
|
||||||
return usernameAttribute;
|
return usernameAttribute;
|
||||||
}
|
}
|
||||||
default ->
|
default ->
|
||||||
|
@ -28,7 +28,7 @@ security:
|
|||||||
clientId: '' # client ID for Keycloak OAuth2
|
clientId: '' # client ID for Keycloak OAuth2
|
||||||
clientSecret: '' # client secret for Keycloak OAuth2
|
clientSecret: '' # client secret for Keycloak OAuth2
|
||||||
scopes: openid, profile, email # scopes for Keycloak OAuth2
|
scopes: openid, profile, email # scopes for Keycloak OAuth2
|
||||||
useAsUsername: preferred_username # field to use as the username for Keycloak OAuth2. Available options are: [email | preferred_name]
|
useAsUsername: preferred_username # field to use as the username for Keycloak OAuth2. Available options are: [email | name | given_name | family_name | preferred_name]
|
||||||
google:
|
google:
|
||||||
clientId: '' # client ID for Google OAuth2
|
clientId: '' # client ID for Google OAuth2
|
||||||
clientSecret: '' # client secret for Google OAuth2
|
clientSecret: '' # client secret for Google OAuth2
|
||||||
|
Loading…
Reference in New Issue
Block a user