Updated athentication with bearer code took from new examples: added realm param

This commit is contained in:
Mauro Mugnaini 2021-05-20 18:26:24 +02:00
parent 1f04175205
commit 93d7da8c74
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ public abstract class AbstractAvatarResource {
private AuthResult authenticate(KeycloakSession session) {
logger.debug("Authenticating with bearer token");
AuthResult auth = new AppAuthManager().authenticateBearerToken(session);
AuthResult auth = new AppAuthManager().authenticateBearerToken(session, session.getContext().getRealm());
if (auth == null) {
logger.debug("Authenticating with identity cookie");
@ -47,7 +47,7 @@ public abstract class AbstractAvatarResource {
public AvatarStorageProvider getAvatarStorageProvider() {
AvatarStorageProvider asp = lookupAvatarStorageProvider(session);
if (asp == null) {
logger.warnf("Provider not found via SPI configuration, defualting to: %s",
logger.warnf("Provider not found via SPI configuration, defaulting to: %s",
DEFAULT_IMPLEMENTATION.getName());
try {