Add ability to get realm attributes
Closes #30241 Signed-off-by: e.sergeenko <sergeenkoegor@yandex.ru>
This commit is contained in:
parent
760e01b9db
commit
f00c2f3eb0
1 changed files with 10 additions and 1 deletions
|
@ -22,6 +22,7 @@ import org.keycloak.authentication.actiontoken.verifyemail.VerifyEmailActionToke
|
||||||
import org.keycloak.models.RealmModel;
|
import org.keycloak.models.RealmModel;
|
||||||
import org.keycloak.representations.idm.CredentialRepresentation;
|
import org.keycloak.representations.idm.CredentialRepresentation;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
@ -69,7 +70,7 @@ public class RealmBean {
|
||||||
public boolean isRegistrationEmailAsUsername() {
|
public boolean isRegistrationEmailAsUsername() {
|
||||||
return realm.isRegistrationEmailAsUsername();
|
return realm.isRegistrationEmailAsUsername();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isLoginWithEmailAllowed() {
|
public boolean isLoginWithEmailAllowed() {
|
||||||
return realm.isLoginWithEmailAllowed();
|
return realm.isLoginWithEmailAllowed();
|
||||||
}
|
}
|
||||||
|
@ -130,4 +131,12 @@ public class RealmBean {
|
||||||
public int getIdpVerifyAccountLinkActionTokenLifespanMinutes() {
|
public int getIdpVerifyAccountLinkActionTokenLifespanMinutes() {
|
||||||
return (int)TimeUnit.SECONDS.toMinutes(realm.getActionTokenGeneratedByUserLifespan(IdpVerifyAccountLinkActionToken.TOKEN_TYPE));
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue