Spring boot and Keycloak

前端 未结 2 421
小蘑菇
小蘑菇 2021-01-27 04:21

I\'m using this example: https://github.com/foo4u/keycloak-spring-demo

I have keycloak.json file in my WEB-INF folder, but when I run my application, I

相关标签:
2条回答
  • 2021-01-27 04:53

    Even though that's a good and valid example, that dates from 2015. I believe it uses Keycloak 1.2.0 which is completely outdated. There are a set of examples with Spring here. Most of them up to date with the latest changes.

    I suggest taking a look at these examples and read the docs as well.

    0 讨论(0)
  • 2021-01-27 05:01

    If you are using keycloak adapter with spring boot 2 or spring boot 1.5, you have to mentioned below properties in application.properties or application.yaml file

    keycloak.auth-server-url=http://localhost:8180/auth
    keycloak.realm=abc
    keycloak.resource=movie-app
    keycloak.public-client=false
    keycloak.principal-attribute=preferred_username
    

    If it still gives the error, please post the error, i will share the code :)

    0 讨论(0)
提交回复
热议问题