Class UserConsentedOAuthEvent

Object
se.curity.identityserver.sdk.data.events.OAuthEvent
se.curity.identityserver.sdk.data.events.UserConsentedOAuthEvent
All Implemented Interfaces:
SerializableAsMap, Event

public class UserConsentedOAuthEvent extends OAuthEvent
An event that represents interactive user consent.
Since:
3.0.0
  • Constructor Details

    • UserConsentedOAuthEvent

      public UserConsentedOAuthEvent(ClientIdentifier requestingClientIdentifier, String requestingSubject, Collection<String> consentedScopes, Collection<String> consentedClaims, Collection<String> requestedScopes, Collection<String> requestedClaims, String profileId)
      Creates a new event representing user consent.
      Parameters:
      requestingClientIdentifier - the requesting client identifier
      requestingSubject - the requesting subject
      consentedScopes - scopes consented by user
      consentedClaims - the claims that were consented to or an empty set if none or only the default scope was
      requestedScopes - the scopes that were requested by the client
      requestedClaims - the claims that were requested by the client
      profileId - the ID of the profile from which this event originated
  • Method Details

    • getRequestingClientId

      @Nonnull public @Nonnull String getRequestingClientId()
      Description copied from class: OAuthEvent
      Returns the ID of the client that made the request causing this event to be posted.
      Overrides:
      getRequestingClientId in class OAuthEvent
      Returns:
      the requesting client's ID
    • getRequestingSubject

      @Nonnull public @Nonnull String getRequestingSubject()
      Description copied from class: OAuthEvent
      Returns subject authenticated for making the request causing this event to be posted.
      Overrides:
      getRequestingSubject in class OAuthEvent
      Returns:
      the requesting subject
    • getConsentedClaims

      public Collection<String> getConsentedClaims()
      Gets the claims that were consented to.

      If the set is empty, then only the default claim (i.e., "" or the default scope) was consented to; otherwise, the set contains all the claims that were consented to.

      Returns:
      the claims that were consented to.
    • asMap

      public Map<String,Object> asMap()
      Description copied from interface: Event
      Get a map representation of this Event.
      Specified by:
      asMap in interface Event
      Specified by:
      asMap in interface SerializableAsMap
      Overrides:
      asMap in class OAuthEvent
      Returns:
      a Map representation of this Event. This can be used to serialize events. Sub-types are encouraged to override this method, calling super.asMap() and enriching the returned mutable Map with the more specific information added by the sub-type.
    • getRequestedClaims

      public Collection<String> getRequestedClaims()
    • getRequestedScopes

      public Collection<String> getRequestedScopes()
    • getConsentedScopes

      public Collection<String> getConsentedScopes()