Enum AccessTokenUtils.Scope

java.lang.Object
java.lang.Enum<AccessTokenUtils.Scope>
org.gitlab4j.api.utils.AccessTokenUtils.Scope
All Implemented Interfaces:
Serializable, Comparable<AccessTokenUtils.Scope>, java.lang.constant.Constable
Enclosing class:
AccessTokenUtils

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

    • API

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

      public static final AccessTokenUtils.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 AccessTokenUtils.Scope READ_REPOSITORY
      Allows read-only access (pull) to the repository through git clone.
    • READ_USER

      public static final AccessTokenUtils.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 AccessTokenUtils.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 AccessTokenUtils.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 AccessTokenUtils.Scope[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static AccessTokenUtils.Scope valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • forValue

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

      public String toValue()
    • toString

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