Add ability to get realm attributes

Closes #30241

Signed-off-by: e.sergeenko <sergeenkoegor@yandex.ru>
This commit is contained in:
e.sergeenko 2024-06-07 11:20:04 +03:00 committed by Marek Posolda
parent 760e01b9db
commit f00c2f3eb0

View file

@ -22,6 +22,7 @@ import org.keycloak.authentication.actiontoken.verifyemail.VerifyEmailActionToke
import org.keycloak.models.RealmModel;
import org.keycloak.representations.idm.CredentialRepresentation;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
@ -130,4 +131,12 @@ public class RealmBean {
public int getIdpVerifyAccountLinkActionTokenLifespanMinutes() {
return (int)TimeUnit.SECONDS.toMinutes(realm.getActionTokenGeneratedByUserLifespan(IdpVerifyAccountLinkActionToken.TOKEN_TYPE));
}
public Map<String, String> getAttributes() {
return realm.getAttributes();
}
public String getAttribute(String key) {
return realm.getAttribute(key);
}
}