Add static builder() method to AppRole class
This commit is contained in:
parent
04d530a5ed
commit
d8b9c2b373
@ -15,6 +15,7 @@
|
|||||||
* Build environment and tests now compatible with Java 10
|
* Build environment and tests now compatible with Java 10
|
||||||
* Updated dependencies to fix vulnerabilities (i.e. CVE-2018-7489)
|
* Updated dependencies to fix vulnerabilities (i.e. CVE-2018-7489)
|
||||||
* New static method `Token.builder()` to get token builder instance
|
* New static method `Token.builder()` to get token builder instance
|
||||||
|
* New static method `AppRole.builder()` to get AppRole builder instance
|
||||||
|
|
||||||
### Deprecation
|
### Deprecation
|
||||||
* `VaultConnectorFactory` is deprecated in favor of `VaultConnectorBuilder` with identical API (#18)
|
* `VaultConnectorFactory` is deprecated in favor of `VaultConnectorBuilder` with identical API (#18)
|
||||||
|
@ -28,6 +28,17 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public final class AppRole {
|
public final class AppRole {
|
||||||
|
/**
|
||||||
|
* Get {@link AppRoleBuilder} instance.
|
||||||
|
*
|
||||||
|
* @param name Role name.
|
||||||
|
* @return AppRole Builder.
|
||||||
|
* @since 0.8
|
||||||
|
*/
|
||||||
|
public static AppRoleBuilder builder(final String name) {
|
||||||
|
return new AppRoleBuilder(name);
|
||||||
|
}
|
||||||
|
|
||||||
@JsonProperty("role_name")
|
@JsonProperty("role_name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@ -836,7 +836,7 @@ public class HTTPVaultConnectorTest {
|
|||||||
String roleName = "TestRole";
|
String roleName = "TestRole";
|
||||||
|
|
||||||
/* Create role model */
|
/* Create role model */
|
||||||
AppRole role = new AppRoleBuilder(roleName).build();
|
AppRole role = AppRole.builder(roleName).build();
|
||||||
|
|
||||||
/* Create role */
|
/* Create role */
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user