Update TokenBuilder example
parent
6fbf14e8a3
commit
72b4c0467e
@ -22,10 +22,10 @@ The connector currently supports four authorization methods.
|
|||||||
##### Create new Token
|
##### Create new Token
|
||||||
```java
|
```java
|
||||||
// Create new token using the builder (supports all current parameters).
|
// Create new token using the builder (supports all current parameters).
|
||||||
Token token = new TokenBuilder()
|
Token token = Token.builder()
|
||||||
.withId("token-id")
|
.withId("token-id")
|
||||||
.withDisplayName("token name")
|
.withDisplayName("token name")
|
||||||
.build();
|
.build();
|
||||||
// Write token to Vault (orphan creatin and role binding possible).
|
// Write token to Vault (orphan creatin and role binding possible).
|
||||||
AuthResponse createResponse = connector.createToken(token);
|
AuthResponse createResponse = connector.createToken(token);
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user