Annotation Interface ExternalRepositoryCredentials
@Repeatable(List.class)
@Retention(RUNTIME)
@Target(FIELD)
public @interface ExternalRepositoryCredentials
Annotation is used to determine
usernames, passwords, and access tokens in the configuration beans of external repositories, and groups
them into credential pairs (username and password or username and token). These annotated fields are not
stored in the repositories.xml file but in the user account vault.
(Where fields with fieldType PASSWORD and TOKEN are encrypted.)
The credentialId property is used to determine credential pairs. It lets beans contain more than a single credential pair and stores them in user the account vault.
If a username and token pair is used, only the token is used in the authorization process.
Example of usage:
The credentialId property is used to determine credential pairs. It lets beans contain more than a single credential pair and stores them in user the account vault.
If a username and token pair is used, only the token is used in the authorization process.
Example of usage:
public class SvnRepositoryConfiguration extends AbstractExternalRepositoryConfiguration { @ExternalRepositoryCredentials(fieldType = FieldType.USERNAME, credentialId = "credentials") private String userName; @ExternalRepositoryCredentials(fieldType = FieldType.PASSWORD, credentialId = "credentials") private String userPassword; private String rootURL; ... public String getRootURL() { return rootURL; } public void setRootURL(String rootURL) { this.rootURL = rootURL; } ... }
- Since:
- 3.7.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static @interface
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescription
-
Element Details
-
fieldType
ExternalRepositoryCredentials.FieldType fieldType -
credentialId
String credentialId
-