Enum Class AccessToken.Scope

java.lang.Object
java.lang.Enum<AccessToken.Scope>
org.miaixz.bus.gitlab.support.AccessToken.Scope
All Implemented Interfaces:
Serializable, Comparable<AccessToken.Scope>, Constable
Enclosing class:
AccessToken

public static enum AccessToken.Scope extends Enum<AccessToken.Scope>
This enum defines the available scopes for a personal access token.
  • Enum Constant Details

    • API

      public static final AccessToken.Scope API
      Grants complete access to the API and Container Registry (read/write) (introduced in GitLab 8.15).
    • READ_REGISTRY

      public static final AccessToken.Scope READ_REGISTRY
      Allows to read (pull) container registry images if a project is private and authorization is required (introduced in GitLab 9.3). If the GitLab server you are using does not have the Registry properly configured, using this scope will result in an exception.
    • READ_REPOSITORY

      public static final AccessToken.Scope READ_REPOSITORY
      Allows read-only access (pull) to the repository through git clone.
    • READ_USER

      public static final AccessToken.Scope READ_USER
      Allows access to the read-only endpoints under /users. Essentially, any of the GET requests in the Users API are allowed (introduced in GitLab 8.15).
    • SUDO

      public static final AccessToken.Scope SUDO
      Allows performing API actions as any user in the system, if the authenticated user is an admin (introduced in GitLab 10.2).
    • WRITE_REPOSITORY

      public static final AccessToken.Scope WRITE_REPOSITORY
      Grants read-write access to repositories on private projects using Git-over-HTTP (not using the API).
  • Method Details

    • values

      public static AccessToken.Scope[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AccessToken.Scope valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • forValue

      public static AccessToken.Scope forValue(String value)
    • toValue

      public String toValue()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<AccessToken.Scope>