Interface TenantAuthentication<T>


public interface TenantAuthentication<T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the authentication object.
    static String
    Returns the default tenant ID.
    Returns the name associated with this authentication object.
    Returns the tenant ID associated with this authentication object.
  • Field Details

  • Method Details

    • getTenantId

      String getTenantId()
      Returns the tenant ID associated with this authentication object.
      Returns:
      The tenant ID of the authenticated principal.
    • getDefaultTenantId

      static String getDefaultTenantId()
      Returns the default tenant ID.
      Returns:
      The default tenant ID.
    • getName

      String getName()
      Returns the name associated with this authentication object.

      This method is intended to have the same semantic meaning as the Principal.getName() method, and returns different values depending on the type of authentication used. For example, if the authentication was performed using OAuth2, the name may correspond to the "sub" (subject) claim of the authentication token. If the authentication was performed using basic authentication, the name may correspond to the username used for authentication.

      Note: Please note that this method does not return the tenant ID or tenant name.

      Returns:
      The name of the authenticated principal.
    • getAuthentication

      T getAuthentication()
      Returns the authentication object.
      Returns:
      The authentication object.