I'm trying to connect my spring boot project to a Keycloak authorization server and this is my application.yml config
spring:
security:
oauth2:
client:
registration:
keycloak:
client-id: my_client
client-secret: my_client_secret
provider:
keycloak:
issuer-uri: http://keycloak:8080/auth/realms/my_realm
token-uri: ${spring.security.oauth2.client.provider.keycloak.issuer-uri}/protocol/openid-connect/token
when I try to reach to my project and login through Keycloak, I will end up in this page
http://keycloak:8080/auth/realms/my_realm/protocol/openid-connect/....
instead of this
http://localhost:8080/auth/realms/my_realm/protocol/openid-connect/....
and I don't want to use my exposed url in my code.
question from:
https://stackoverflow.com/questions/65870019/setting-keycloak-url-in-spring-boot-in-a-dockerized-environment 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…