Class Authentications

java.lang.Object
sonia.scm.security.Authentications

public class Authentications extends Object
  • Field Details

    • PRINCIPAL_SYSTEM

      public static final String PRINCIPAL_SYSTEM
      Username of the system account.
      Since:
      2.14.0
      See Also:
    • PRINCIPAL_ANONYMOUS

      public static final String PRINCIPAL_ANONYMOUS
      Username of the anonymous account.
      Since:
      2.14.0
      See Also:
  • Method Details

    • isAuthenticatedSubjectAnonymous

      public static boolean isAuthenticatedSubjectAnonymous()
    • isSubjectAnonymous

      public static boolean isSubjectAnonymous(String principal)
    • isSubjectSystemAccount

      public static boolean isSubjectSystemAccount(String principal)
      Returns true if the given principal is equal to the one from the system account.
      Parameters:
      principal - principal
      Returns:
      true
      Since:
      2.14.0