I am trying to login into application using org.springframework.security.oauth2.client.oidc
which is working when i had extended these classes MySynchronizingOidcUserMapper
and
CustomDefaultJmixOidcUserService
@Service
public class CustomDefaultJmixOidcUserService extends DefaultJmixOidcUserService
@Component
public class MySynchronizingOidcUserMapper extends SynchronizingOidcUserMapper<User> {
But since to login using oidc if jmix.oidc.use-default-configuration set to true then login page with username and password is not displayed instead sso login page is displayed so to display both login page i had refer to this link https://github.com/jmix-framework/jmix-samples/tree/main/social-login-sample and when i added OAuthSecurityConfig
then i was able to login with username and password of normal login user and when i tried with LDAP login i was getting success response but page was getting redirected to login page instead into application if i remove OAuthSecurityConfig
class then as per the previous LDAP login configuration it works but Normal login page is not displayed.
OAuthSecurityConfig.zip (1.3 KB)
oidcClasses.zip (5.3 KB)
jmix.oidc.use-default-configuration=true
spring.security.oauth2.client.registration.adfs.client-id=sdshd-283834nn-dnsnd
spring.security.oauth2.client.registration.adfs.client-secret=sdshd-283834nn-dnsnd
spring.security.oauth2.client.registration.adfs.scope=openid, profile, email
spring.security.oauth2.client.provider.adfs.issuer-uri=https://sts.domain.com/adfs
spring.security.oauth2.resourceserver.jwt.issuer-uri=https://sts.domain.com/adfs/discovery/keys
spring.security.oauth2.client.registration.adfs.redirect-uri=https://domain.com/adfs/login/oauth2/code/adfs
spring.security.oauth2.client.provider.adfs.authorization-grant-type=authorization_code
spring.security.oauth2.client.provider.adfs.authorization-uri=https://sts.domain.com/adfs/oauth2/authorize
spring.security.oauth2.client.provider.adfs.token-uri=https://sts.domain.com/adfs/oauth2/token
spring.security.oauth2.client.provider.adfs.user-name-attribute=upn