org.keycloak.authentication.authenticators.broker.util

## 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 and Description
    --- | ---
    `static class` | `SerializedBrokeredIdentityContext.ContextDataEntry`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SerializedBrokeredIdentityContext()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `BrokeredIdentityContext` | `deserialize(KeycloakSession session, AuthenticationSessionModel authSession)`
    `List<String>` | `getAttribute(String key)`
    `Map<String,List<String>>` | `getAttributes()`
    `Stream<String>` | `getAttributeStream(String key)` Obtains all values associated with the specified attribute name.
    `String` | `getBrokerSessionId()`
    `String` | `getBrokerUserId()`
    `String` | `getBrokerUsername()`
    `String` | `getCode()`
    `Map<String,SerializedBrokeredIdentityContext.ContextDataEntry>` | `getContextData()`
    `String` | `getEmail()`
    `String` | `getFirstAttribute(String name)`
    `String` | `getFirstName()`
    `String` | `getId()`
    `String` | `getIdentityProviderId()`
    `String` | `getLastName()`
    `String` | `getModelUsername()`
    `String` | `getToken()`
    `String` | `getUsername()`
    `boolean` | `isEditUsernameAllowed()`
    `static SerializedBrokeredIdentityContext` | `readFromAuthenticationSession(AuthenticationSessionModel authSession, String noteKey)`
    `void` | `saveToAuthenticationSession(AuthenticationSessionModel authSession, String noteKey)`
    `static SerializedBrokeredIdentityContext` | `serialize(BrokeredIdentityContext context)`
    `void` | `setAttribute(String key, List<String> value)`
    `void` | `setBrokerSessionId(String brokerSessionId)`
    `void` | `setBrokerUserId(String brokerUserId)`
    `void` | `setBrokerUsername(String modelUsername)`
    `void` | `setCode(String code)`
    `void` | `setContextData(Map<String,SerializedBrokeredIdentityContext.ContextDataEntry> contextData)`
    `void` | `setEmail(String email)`
    `void` | `setFirstName(String firstName)`
    `void` | `setId(String id)`
    `void` | `setIdentityProviderId(String identityProviderId)`
    `void` | `setLastName(String lastName)`
    `void` | `setModelUsername(String modelUsername)`
    `void` | `setSingleAttribute(String name, String value)`
    `void` | `setToken(String token)`
    `void` | `setUsername(String username)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SerializedBrokeredIdentityContext

          public SerializedBrokeredIdentityContext()

  - ### Method Detail

    - #### isEditUsernameAllowed

          public boolean isEditUsernameAllowed()

      Specified by:
        `isEditUsernameAllowed` in interface `UpdateProfileContext`

    - #### getId

          public String getId()

    - #### setId

          public void setId(String id)

    - #### getUsername

          public String getUsername()

      Specified by:
        `getUsername` in interface `UpdateProfileContext`

    - #### setUsername

          public void setUsername(String username)

      Specified by:
        `setUsername` in interface `UpdateProfileContext`

    - #### 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 interface `UpdateProfileContext`

    - #### setEmail

          public void setEmail(String email)

      Specified by:
        `setEmail` in interface `UpdateProfileContext`

    - #### getFirstName

          public String getFirstName()

      Specified by:
        `getFirstName` in interface `UpdateProfileContext`

    - #### setFirstName

          public void setFirstName(String firstName)

      Specified by:
        `setFirstName` in interface `UpdateProfileContext`

    - #### getLastName

          public String getLastName()

      Specified by:
        `getLastName` in interface `UpdateProfileContext`

    - #### setLastName

          public void setLastName(String lastName)

      Specified by:
        `setLastName` in interface `UpdateProfileContext`

    - #### 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 interface `UpdateProfileContext`

    - #### setSingleAttribute

          public void setSingleAttribute(String name,
                                         String value)

      Specified by:
        `setSingleAttribute` in interface `UpdateProfileContext`

    - #### setAttribute

          public void setAttribute(String key,
                                   List<String> value)

      Specified by:
        `setAttribute` in interface `UpdateProfileContext`

    - #### getAttribute

          public List<String> getAttribute(String key)

      Specified by:
        `getAttribute` in interface `UpdateProfileContext`

    - #### 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 interface `UpdateProfileContext`
      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 interface `UpdateProfileContext`

    - #### 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)

Copyright © 2021 JBoss by Red Hat. All rights reserved.