Class OAuthEvent

Object
se.curity.identityserver.sdk.data.events.OAuthEvent
All Implemented Interfaces:
SerializableAsMap, Event
Direct Known Subclasses:
AuthorizationCodeOAuthEvent, ConsentorCompleteOAuthEvent, DelegationOauthEvent, DeviceCodeOAuthEvent, ProblemOAuthEvent, RegisteredDcrClientOAuthEvent, TokenOAuthEvent, UserConsentedOAuthEvent, UserInfoOAuthEvent

public abstract class OAuthEvent extends Object implements Event
Common base class for OAuth events.
Since:
2.3.0
  • Constructor Details

    • OAuthEvent

      public OAuthEvent(String profileId)
      Constructor for OAuthEvent with profile ID.
      Parameters:
      profileId - the ID of the profile from which this event originated
    • OAuthEvent

      public OAuthEvent(@Nullable ClientIdentifier requestingClientIdentifier, @Nullable String requestingSubject, String profileId)
      Constructor for OAuthEvent.
      Parameters:
      requestingClientIdentifier - the requesting client identifier
      requestingSubject - the requesting subject
      profileId - the ID of the profile from which this event originated
      Since:
      5.1.0
  • Method Details

    • getRequestingClientId

      @Nullable public @Nullable String getRequestingClientId()
      Returns the ID of the client that made the request causing this event to be posted.
      Returns:
      the requesting client's ID
    • getRequestingClientName

      @Nullable public @Nullable String getRequestingClientName()
      Returns the name of the client that made the request causing this event to be posted.
      Returns:
      the requesting client's name
    • getRequestingSubject

      @Nullable public @Nullable String getRequestingSubject()
      Returns subject authenticated for making the request causing this event to be posted.
      Returns:
      the requesting subject
    • getProfileId

      public String getProfileId()
      Get the ID of the profile from which this event originated
      Returns:
      profile ID
      Since:
      7.0.0
    • 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
      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.
    • putIfNotNull

      protected static void putIfNotNull(String key, @Nullable Object value, Map<String,Object> map)
    • toString

      public String toString()
      Overrides:
      toString in class Object