[keycloak-user] Keycloak does not return Principal for Spring Boot with Spring Security project

CLAYTON BODINE cbodine at msn.com
Wed Dec 12 20:17:02 EST 2018


Hello all:

I have followed the steps from http://blog.keycloak.org/2017/05/easily-secure-your-spring-boot.html and found that Keycloak will secure the example but does not seem to be able to return a Principal. I am not sure what I have done wrong, especially since I have not modified the example. I noticed that I am using Spring Boot 1.5.16.RELEASE which is several versions ahead of the example (but a few versions behind what is available from https://start.spring.io/. I think Keycloak is great but if I cannot somehow learn who the logged in user is from the Principal (or some other means) then I might not be able to use it for the projects that I have in mind.

Thanks!

Clayton
Spring Framework - Spring Initializr<https://start.spring.io/>
{"_links":{"maven-project":{"href":"https://start.spring.io/starter.zip?type=maven-project{&dependencies,packaging,javaVersion,language,bootVersion,groupId,artifactId ...
start.spring.io


[https://lh4.googleusercontent.com/proxy/Nu0C05WIS1nzgEEGZJ58I5B3iH2zTo7CFpj6WQDYZMPkGl-x-p3H8cHyYZHVIV33h-MB4Afc6tRb6Qli5JEObkEc10EDXe2kpn1Yf6S4rdB7q0RyxpRqL4ivep-zyhJtbVI=w1200-h630-p-k-no-nu]<http://blog.keycloak.org/2017/05/easily-secure-your-spring-boot.html>

Easily secure your Spring Boot applications with Keycloak<http://blog.keycloak.org/2017/05/easily-secure-your-spring-boot.html>
Keycloak defines the concept of a realm in which you will define your clients, which in Keycloak terminology means an application that will be secured by Keycloak, it can be a Web App, a Java EE backend, a Spring Boot etc.
blog.keycloak.org




More information about the keycloak-user mailing list