java - Keycloak + Spring Security, through local login form -
good day, dear stackoverflow community (and too, jon skeet, may answer question , free me of burden, messiah).
i trying integrate keycloak spring security layer. have achieved that, issue have yet solve following:
when endpoint hit, requires user authenticated, site redirects keycloak login page. after login, user redirected page requested. im trying achieve is: do not want users redirecting app keycloak login page, , again, better yet, login through form on app , "proxy" captured details keycloak , login token back.
if can shed light on above, whether possible or not, , if so, direction solution smashing.
pom.xml:
<dependency> <groupid>org.keycloak</groupid> <artifactid>keycloak-spring-boot-adapter</artifactid> <version>2.4.0.final</version> </dependency> <dependency> <groupid>org.keycloak</groupid> <artifactid>keycloak-tomcat8-adapter</artifactid> <version>2.4.0.final</version> </dependency>
application.properties:
keycloak.realm=my_realm keycloak.realmkey=my_realm_key keycloak.auth-server-url=my_server_url keycloak.resource=my_resource keycloak.ssl-required=external keycloak.public-client=true keycloak.use-resource-role-mappings=true keycloak.securityconstraints[0].securitycollections[0].name=static-resources keycloak.securityconstraints[0].securitycollections[0].patterns[0]=/css/* keycloak.securityconstraints[0].securitycollections[0].patterns[1]=/fonts/* keycloak.securityconstraints[0].securitycollections[0].patterns[2]=/js/* keycloak.securityconstraints[1].securitycollections[0].name=application keycloak.securityconstraints[1].securitycollections[0].authroles[0]=my_role keycloak.securityconstraints[1].securitycollections[0].patterns[0]=/api/*
any appreciated. thank you.
what trying achieve contradicts generell purpose of keycloak keep user information separated application itself. therefore there (as fas know) no default/clean way achieve this.
instead consider styling login page fit applications visual appearance.
Comments
Post a Comment