Class SingleSignOnContext

java.lang.Object
com.vaadin.hilla.sso.starter.SingleSignOnContext

@Deprecated(since="4.2", forRemoval=true) public class SingleSignOnContext extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
SSO Kit is deprecated as of Vaadin 25.3 and will be removed in Vaadin 26.0. Use the built-in Spring Security support for OpenID Connect instead.
Contains utility methods and information related to single sign-on.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SingleSignOnContext(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository, SingleSignOnProperties properties, BackChannelLogoutSubscription backChannelLogoutSubscription)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    reactor.core.publisher.Flux<BackChannelLogoutSubscription.Message>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the Flux of back-channel logout messages for the current user.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the URL of the back-channel logout endpoint.
    static Optional<org.springframework.security.oauth2.core.oidc.user.OidcUser>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Conveniently get the current OIDC user from context.
    @Nonnull List<@Nonnull String>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns all the registered OAuth2 providers.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the data for the single sign-on, to be used to get everything with a single request.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Exposes the configuration property which determines whether the back-channel logout is enabled.
    static List<String>
    userRoles(org.springframework.security.oauth2.core.oidc.user.OidcUser user)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the roles of the user, converted by removing the standard prefix.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SingleSignOnContext

      public SingleSignOnContext(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository, SingleSignOnProperties properties, BackChannelLogoutSubscription backChannelLogoutSubscription)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getOidcUser

      public static Optional<org.springframework.security.oauth2.core.oidc.user.OidcUser> getOidcUser()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Conveniently get the current OIDC user from context.
      Returns:
      the OidcUser as an Optional, or null if the user is not authenticated or is not a OIDC user
    • getRegisteredProviders

      public @Nonnull List<@Nonnull String> getRegisteredProviders()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns all the registered OAuth2 providers.
      Returns:
      a list of identifiers of the registered OAuth2 providers, as defined in the application properties.
    • getSingleSignOnData

      public SingleSignOnData getSingleSignOnData()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the data for the single sign-on, to be used to get everything with a single request.
      Returns:
      the data for the single sign-on.
    • userRoles

      public static List<String> userRoles(org.springframework.security.oauth2.core.oidc.user.OidcUser user)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the roles of the user, converted by removing the standard prefix.
      Parameters:
      user - the OIDC user.
      Returns:
      the roles of the user.
    • isBackChannelLogoutEnabled

      public boolean isBackChannelLogoutEnabled()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Exposes the configuration property which determines whether the back-channel logout is enabled.
      Returns:
      true if the back-channel logout is enabled, false otherwise.
    • getBackChannelLogoutFlux

      public reactor.core.publisher.Flux<BackChannelLogoutSubscription.Message> getBackChannelLogoutFlux()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the Flux of back-channel logout messages for the current user.
      Returns:
      a flux which is a filter of the global flux.
    • getLogoutLink

      public Optional<String> getLogoutLink()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the URL of the back-channel logout endpoint. This must be called by the client to finalize the logout procedure.
      Returns:
      the URL of the back-channel logout endpoint as an Optional.