Interface TenantAuthentication<T>


public interface TenantAuthentication<T>
  • 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.
    • getDefaultSysTenant

      static Short getDefaultSysTenant()
      Returns the default sys tenant.
      Returns:
      The default sys tenant.
    • 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.