org.keycloak.userprofile.profile

## Class DefaultUserProfileContext

- java.lang.Object
- - org.keycloak.userprofile.profile.DefaultUserProfileContext

- All Implemented Interfaces:
    UserProfileContext

      public class DefaultUserProfileContext
      extends Object
      implements UserProfileContext

  Author:
    Markus Till

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DefaultUserProfileContext` | `forAccountService(UserModel currentUser)`
    `static DefaultUserProfileContext` | `forIdpReview(SerializedBrokeredIdentityContext currentUser)`
    `static DefaultUserProfileContext` | `forRegistrationProfile()`
    `static DefaultUserProfileContext` | `forRegistrationUserCreation()`
    `static DefaultUserProfileContext` | `forUpdateProfile(UserModel currentUser)`
    `static DefaultUserProfileContext` | `forUserResource(UserModel currentUser)`
    `UserProfile` | `getCurrentProfile()`
    `UserUpdateEvent` | `getUpdateEvent()`

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

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

- - ### Method Detail

    - #### forIdpReview

          public static DefaultUserProfileContext forIdpReview(SerializedBrokeredIdentityContext currentUser)

    - #### forUpdateProfile

          public static DefaultUserProfileContext forUpdateProfile(UserModel currentUser)

    - #### forAccountService

          public static DefaultUserProfileContext forAccountService(UserModel currentUser)

    - #### forRegistrationUserCreation

          public static DefaultUserProfileContext forRegistrationUserCreation()

    - #### forRegistrationProfile

          public static DefaultUserProfileContext forRegistrationProfile()

    - #### forUserResource

          public static DefaultUserProfileContext forUserResource(UserModel currentUser)

      Parameters:
        `currentUser` - if this is null, then we're creating new user. If it is not null, we're updating existing user
      Returns:
        user profile context for the validation of user when called from admin REST API

    - #### getCurrentProfile

          public UserProfile getCurrentProfile()

      Specified by:
        `getCurrentProfile` in interface `UserProfileContext`

    - #### getUpdateEvent

          public UserUpdateEvent getUpdateEvent()

      Specified by:
        `getUpdateEvent` in interface `UserProfileContext`

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