Class OAuth2ScopeCapability

java.lang.Object
com.google.jenkins.plugins.credentials.oauth.OAuth2ScopeCapability

public final class OAuth2ScopeCapability extends Object
A logical capability an OAuth2 consumer needs.

NOTE: A small set of common capabilities is predefined here. Additional capabilities can be created with of(String) when both caller and provider agree on the id.

  • Field Details

  • Method Details

    • of

      @NonNull public static OAuth2ScopeCapability of(@NonNull String id)
      Creates a capability not covered by predefined constants.
      Parameters:
      id - unique capability id, e.g. "SEND_EMAIL"
      Returns:
      capability instance for the given id
    • getId

      @NonNull public String getId()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object