
com.cloudbees.api.oauth.AbstractOauthToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudbees-api-client Show documentation
Show all versions of cloudbees-api-client Show documentation
The CloudBees API Client library for Java
package com.cloudbees.api.oauth;
import com.cloudbees.api.OAuthObject;
import org.codehaus.jackson.annotate.JsonProperty;
/**
* Common part between {@link OauthToken} and {@link OauthTokenDetail}
*
* @author Kohsuke Kawaguchi
*/
public class AbstractOauthToken extends OAuthObject {
/**
* ID that represents this token among other tokens that the user has created.
* Used for updating/revoking this token.
*/
@JsonProperty("id")
public String id;
/**
* Internal user ID that identifies the user who generated this token.
*/
@JsonProperty("uid")
public String uid;
/**
* E-mail address of the user identified by {@link #uid}
*/
@JsonProperty("email")
public String email;
/**
* User's account management role, for example "admin" or "user"
*/
@JsonProperty("user_account_role")
public String userAccountRole;
/**
* Deletes this token.
*/
public void delete() throws OauthClientException {
owner.deleteToken(id);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy