Document AuthInfo class

Change-Id: I012f23c962abe7335bfd317998935b2e3139e2f1
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2019-12-31 11:00:00 +01:00
parent 59b5a1cbb3
commit 080ea481ce

View File

@@ -19,18 +19,104 @@ import com.google.gerrit.extensions.client.AuthType;
import com.google.gerrit.extensions.client.GitBasicAuthPolicy;
import java.util.List;
/** API response containing values from the {@code auth} section of {@code gerrit.config}. */
/**
* Representation of auth-related server configuration in the REST API.
*
* <p>This class determines the JSON format of auth-related server configuration in the REST API.
*
* <p>The contained values come from the {@code auth} section of {@code gerrit.config}.
*/
public class AuthInfo {
/**
* The authentication type that is configured on the server.
*
* <p>The value of the {@code auth.type} parameter in {@code gerrit.config}.
*/
public AuthType authType;
/**
* Whether contributor agreements are required.
*
* <p>The value of the {@code auth.contributorAgreements} parameter in {@code gerrit.config}.
*/
public Boolean useContributorAgreements;
/** List of contributor agreements that have been configured on the server. */
public List<AgreementInfo> contributorAgreements;
/** List of account fields that are editable. */
public List<AccountFieldName> editableAccountFields;
/**
* The login URL.
*
* <p>The value of the {@code auth.loginUrl} parameter in {@code gerrit.config}.
*
* <p>Only set if authentication type is {@code HTTP} or {@code HTTP_LDAP}.
*/
public String loginUrl;
/**
* The login text.
*
* <p>The value of the {@code auth.loginText} parameter in {@code gerrit.config}.
*
* <p>Only set if authentication type is {@code HTTP} or {@code HTTP_LDAP}.
*/
public String loginText;
/**
* The URL to switch accounts.
*
* <p>The value of the {@code auth.switchAccountUrl} parameter in {@code gerrit.config}.
*/
public String switchAccountUrl;
/**
* The register URL.
*
* <p>The value of the {@code auth.registerUrl} parameter in {@code gerrit.config}.
*
* <p>Only set if authentication type is {@code LDAP}, {@code LDAP_BIND} or {@code
* CUSTOM_EXTENSION}.
*/
public String registerUrl;
/**
* The register text.
*
* <p>The value of the {@code auth.registerText} parameter in {@code gerrit.config}.
*
* <p>Only set if authentication type is {@code LDAP}, {@code LDAP_BIND} or {@code
* CUSTOM_EXTENSION}.
*/
public String registerText;
/**
* The URL to edit the full name.
*
* <p>The value of the {@code auth.editFullNameUrl} parameter in {@code gerrit.config}.
*
* <p>Only set if authentication type is {@code LDAP}, {@code LDAP_BIND} or {@code
* CUSTOM_EXTENSION}.
*/
public String editFullNameUrl;
/**
* The URL to obtain an HTTP password.
*
* <p>The value of the {@code auth.httpPasswordUrl} parameter in {@code gerrit.config}.
*
* <p>Only set if authentication type is {@code CUSTOM_EXTENSION}.
*/
public String httpPasswordUrl;
/**
* The policy to authenticate Git over HTTP and REST API requests.
*
* <p>The value of the {@code auth.gitBasicAuthPolicy} parameter in {@code gerrit.config}.
*
* <p>Only set if authentication type is {@code LDAP}, {@code LDAP_BIND} or {@code OAUTH}.
*/
public GitBasicAuthPolicy gitBasicAuthPolicy;
}