Get login credentials from Keycloak accessToken

Is there a way I can retrieve the login credentials from the access token? I can see with a decoder that there is the username, but I cannot see the password (I wound expect to find it there encoded?). Can I somehow set that I want this information in the token? "scope": "openid email profile… Read More Get login credentials from Keycloak accessToken

Use Keycloak Spring Adapter with Spring Boot 3

I updated to Spring Boot 3 in a project that uses the Keycloak Spring Adapter. Unfortunately it doesn’t start because the KeycloakWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter which was first deprecated in Spring Security and then removed. Is there currently another way to implement security with Keycloak? Or to put it in other words: How can I use… Read More Use Keycloak Spring Adapter with Spring Boot 3

Keycloak Roles: Uncaught TypeError: Cannot read properties of undefined (reading 'roles') – React

I have the following code: class Secured extends Component { import React, { Component } from ‘react’; import Keycloak from ‘keycloak-js’; constructor(props) { super(props); this.state = { keycloak: null, authenticated: false, roles: [] }; } componentDidMount() { const keycloak = Keycloak(‘/keycloak.json’); keycloak.init({onLoad: ‘login-required’}).then(authenticated => { this.setState({ keycloak: keycloak, authenticated: authenticated, roles: keycloak.tokenParsed.realm_access.roles}) }) } render()… Read More Keycloak Roles: Uncaught TypeError: Cannot read properties of undefined (reading 'roles') – React