public final class KeycloakModelUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static UserModel |
findUserByNameOrEmail(RealmModel realm,
String username)
Try to find user by given username.
|
static String |
generateId() |
static String |
getPemFromKey(Key key) |
static PrivateKey |
getPrivateKey(String privateKeyPem) |
static PublicKey |
getPublicKey(String publicKeyPem) |
static boolean |
searchFor(RoleModel role,
RoleModel composite,
Set<RoleModel> visited)
Deep search if given role is descendant of composite role
|
public static String generateId()
public static PrivateKey getPrivateKey(String privateKeyPem)
public static boolean searchFor(RoleModel role, RoleModel composite, Set<RoleModel> visited)
role - role to checkcomposite - composite rolevisited - set of already visited roles (used for recursion)public static UserModel findUserByNameOrEmail(RealmModel realm, String username)
realm - realmusername - username or email of userCopyright © 2014. All Rights Reserved.