Class UserUpdateProfileContext
- java.lang.Object
-
- org.keycloak.authentication.requiredactions.util.UserUpdateProfileContext
-
- All Implemented Interfaces:
UpdateProfileContext
public class UserUpdateProfileContext extends Object implements UpdateProfileContext
- Author:
- Marek Posolda
-
-
Constructor Summary
Constructors Constructor Description UserUpdateProfileContext(org.keycloak.models.RealmModel realm, org.keycloak.models.UserModel user)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,List<String>>
getAttributes()
Stream<String>
getAttributeStream(String key)
Obtains all values associated with the specified attribute name.String
getEmail()
String
getFirstAttribute(String name)
String
getFirstName()
String
getLastName()
String
getUsername()
org.keycloak.userprofile.UserProfileContext
getUserProfileContext()
boolean
isEditUsernameAllowed()
void
setAttribute(String key, List<String> value)
void
setEmail(String email)
void
setFirstName(String firstName)
void
setLastName(String lastName)
void
setSingleAttribute(String name, String value)
void
setUsername(String username)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.authentication.requiredactions.util.UpdateProfileContext
getAttribute
-
-
-
-
Method Detail
-
isEditUsernameAllowed
public boolean isEditUsernameAllowed()
- Specified by:
isEditUsernameAllowed
in interfaceUpdateProfileContext
-
getUserProfileContext
public org.keycloak.userprofile.UserProfileContext getUserProfileContext()
- Specified by:
getUserProfileContext
in interfaceUpdateProfileContext
-
getUsername
public String getUsername()
- Specified by:
getUsername
in interfaceUpdateProfileContext
-
setUsername
public void setUsername(String username)
- Specified by:
setUsername
in interfaceUpdateProfileContext
-
getEmail
public String getEmail()
- Specified by:
getEmail
in interfaceUpdateProfileContext
-
setEmail
public void setEmail(String email)
- Specified by:
setEmail
in interfaceUpdateProfileContext
-
getFirstName
public String getFirstName()
- Specified by:
getFirstName
in interfaceUpdateProfileContext
-
setFirstName
public void setFirstName(String firstName)
- Specified by:
setFirstName
in interfaceUpdateProfileContext
-
getLastName
public String getLastName()
- Specified by:
getLastName
in interfaceUpdateProfileContext
-
setLastName
public void setLastName(String lastName)
- Specified by:
setLastName
in interfaceUpdateProfileContext
-
getAttributes
public Map<String,List<String>> getAttributes()
- Specified by:
getAttributes
in interfaceUpdateProfileContext
-
setSingleAttribute
public void setSingleAttribute(String name, String value)
- Specified by:
setSingleAttribute
in interfaceUpdateProfileContext
-
setAttribute
public void setAttribute(String key, List<String> value)
- Specified by:
setAttribute
in interfaceUpdateProfileContext
-
getFirstAttribute
public String getFirstAttribute(String name)
- Specified by:
getFirstAttribute
in interfaceUpdateProfileContext
-
getAttributeStream
public Stream<String> getAttributeStream(String key)
Description copied from interface:UpdateProfileContext
Obtains all values associated with the specified attribute name.- Specified by:
getAttributeStream
in interfaceUpdateProfileContext
- Parameters:
key
- the name of the attribute.- Returns:
- a non-null
Stream
of attribute values.
-
-