All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cloudbees.api.oauth.OauthClientApplication Maven / Gradle / Ivy

package com.cloudbees.api.oauth;

import com.cloudbees.api.OAuthObject;
import org.codehaus.jackson.annotate.JsonProperty;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * State representation of OAuth client application.
 *
 * @author Kohsuke Kawaguchi
 */
public class OauthClientApplication extends OAuthObject {
    @JsonProperty
    public String name;

    @JsonProperty
    public String callback_uri;

    @JsonProperty
    public String app_url;

    /**
     * The mode of token issuance allowed for this application.
     */
    @JsonProperty("grant_type")
    public Set grant_types = new HashSet();

    /**
     * If your user ID belongs to multiple accounts,
     * specify which account this app is registered under.
     */
    @JsonProperty
    public String account;

    @JsonProperty
    public List scopes;

    /**
     * Client ID of the application.
     *
     * This value is assigned by {@link OauthClient#registerApplication(OauthClientApplication)} when you make a call.
     */
    @JsonProperty
    public String client_id;

    /**
     * Client secret that forms a pair with {@link #client_id}
     *
     * This value is assigned by {@link OauthClient#registerApplication(OauthClientApplication)} when you make a call.
     */
    @JsonProperty
    public String client_secret;

    /**
     * Unregisters this application and voids its client ID/secret.
     */
    public void delete() throws OauthClientException {
        owner.deleteApplication(client_id);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy