mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-09-18 01:19:24 +00:00
Update app/proprietary/src/main/java/stirling/software/proprietary/security/service/CustomUserDetailsService.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
25013d7ccb
commit
15be7ce90f
@ -75,8 +75,8 @@ public class CustomUserDetailsService implements UserDetailsService {
|
|||||||
*/
|
*/
|
||||||
private AuthenticationType determinePreferredSSOType() {
|
private AuthenticationType determinePreferredSSOType() {
|
||||||
// Check what SSO types are enabled and prefer in order: OAUTH2 > SAML2 > fallback to OAUTH2
|
// Check what SSO types are enabled and prefer in order: OAUTH2 > SAML2 > fallback to OAUTH2
|
||||||
boolean oauth2Enabled = securityProperties.getOauth2().getEnabled();
|
boolean oauth2Enabled = securityProperties.getOauth2() != null && securityProperties.getOauth2().getEnabled();
|
||||||
boolean saml2Enabled = securityProperties.getSaml2().getEnabled();
|
boolean saml2Enabled = securityProperties.getSaml2() != null && securityProperties.getSaml2().getEnabled();
|
||||||
|
|
||||||
if (oauth2Enabled) {
|
if (oauth2Enabled) {
|
||||||
return AuthenticationType.OAUTH2;
|
return AuthenticationType.OAUTH2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user