Class SerializedBrokeredIdentityContext
- java.lang.Object
-
- org.keycloak.authentication.authenticators.broker.util.SerializedBrokeredIdentityContext
-
- All Implemented Interfaces:
UpdateProfileContext
public class SerializedBrokeredIdentityContext extends Object implements UpdateProfileContext
- Author:
- Marek Posolda
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SerializedBrokeredIdentityContext.ContextDataEntry
-
Constructor Summary
Constructors Constructor Description SerializedBrokeredIdentityContext()
-
Method Summary
-
-
-
Method Detail
-
isEditUsernameAllowed
public boolean isEditUsernameAllowed()
- Specified by:
isEditUsernameAllowed
in interfaceUpdateProfileContext
-
getUserProfileContext
public UserProfileContext getUserProfileContext()
- Specified by:
getUserProfileContext
in interfaceUpdateProfileContext
-
getId
public String getId()
-
setId
public void setId(String id)
-
getUsername
public String getUsername()
- Specified by:
getUsername
in interfaceUpdateProfileContext
-
setUsername
public void setUsername(String username)
- Specified by:
setUsername
in interfaceUpdateProfileContext
-
isEditEmailAllowed
public boolean isEditEmailAllowed()
- Specified by:
isEditEmailAllowed
in interfaceUpdateProfileContext
-
getModelUsername
public String getModelUsername()
-
setModelUsername
public void setModelUsername(String modelUsername)
-
getBrokerUsername
public String getBrokerUsername()
-
setBrokerUsername
public void setBrokerUsername(String modelUsername)
-
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
-
getBrokerSessionId
public String getBrokerSessionId()
-
setBrokerSessionId
public void setBrokerSessionId(String brokerSessionId)
-
getBrokerUserId
public String getBrokerUserId()
-
setBrokerUserId
public void setBrokerUserId(String brokerUserId)
-
getCode
public String getCode()
-
setCode
public void setCode(String code)
-
getToken
public String getToken()
-
setToken
public void setToken(String token)
-
getIdentityProviderId
public String getIdentityProviderId()
-
setIdentityProviderId
public void setIdentityProviderId(String identityProviderId)
-
getContextData
public Map<String,SerializedBrokeredIdentityContext.ContextDataEntry> getContextData()
-
setContextData
public void setContextData(Map<String,SerializedBrokeredIdentityContext.ContextDataEntry> contextData)
-
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
-
getAttribute
public List<String> getAttribute(String key)
- Specified by:
getAttribute
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.
-
getFirstAttribute
public String getFirstAttribute(String name)
- Specified by:
getFirstAttribute
in interfaceUpdateProfileContext
-
deserialize
public BrokeredIdentityContext deserialize(KeycloakSession session, AuthenticationSessionModel authSession)
-
serialize
public static SerializedBrokeredIdentityContext serialize(BrokeredIdentityContext context)
-
saveToAuthenticationSession
public void saveToAuthenticationSession(AuthenticationSessionModel authSession, String noteKey)
-
readFromAuthenticationSession
public static SerializedBrokeredIdentityContext readFromAuthenticationSession(AuthenticationSessionModel authSession, String noteKey)
-
-