public class LoginToken extends VaultToken
Modifier and Type | Method and Description |
---|---|
Duration |
getLeaseDuration() |
boolean |
isRenewable() |
static LoginToken |
of(char[] token)
Create a new
LoginToken . |
static LoginToken |
of(char[] token,
Duration leaseDuration)
Create a new
LoginToken with a leaseDurationSeconds . |
static LoginToken |
of(char[] token,
long leaseDurationSeconds)
Deprecated.
since 2.0, use
of(char[], Duration) for time unit safety. |
static LoginToken |
of(String token)
Create a new
LoginToken . |
static LoginToken |
of(String token,
long leaseDurationSeconds)
Deprecated.
since 2.0, use
of(char[], Duration) for time unit safety. |
static LoginToken |
renewable(char[] token,
Duration leaseDuration)
Create a new renewable
LoginToken with a leaseDurationSeconds . |
static LoginToken |
renewable(char[] token,
long leaseDurationSeconds)
Deprecated.
since 2.0, use
renewable(char[], Duration) for time unit
safety. |
static LoginToken |
renewable(String token,
long leaseDurationSeconds)
Deprecated.
since 2.0, use
renewable(char[], Duration) for time unit
safety. |
static LoginToken |
renewable(VaultToken token,
Duration leaseDuration)
Create a new renewable
LoginToken with a leaseDurationSeconds . |
getToken, toCharArray
public static LoginToken of(String token)
LoginToken
.token
- must not be null.VaultToken
public static LoginToken of(char[] token)
LoginToken
.token
- must not be null.VaultToken
@Deprecated public static LoginToken of(String token, long leaseDurationSeconds)
of(char[], Duration)
for time unit safety.LoginToken
with a leaseDurationSeconds
.token
- must not be null.leaseDurationSeconds
- the lease duration in seconds, must not be negative.VaultToken
@Deprecated public static LoginToken of(char[] token, long leaseDurationSeconds)
of(char[], Duration)
for time unit safety.LoginToken
with a leaseDurationSeconds
.token
- must not be null.leaseDurationSeconds
- the lease duration in seconds, must not be negative.VaultToken
public static LoginToken of(char[] token, Duration leaseDuration)
LoginToken
with a leaseDurationSeconds
.token
- must not be null.leaseDuration
- the lease duration, must not be negative and not be
null.VaultToken
@Deprecated public static LoginToken renewable(String token, long leaseDurationSeconds)
renewable(char[], Duration)
for time unit
safety.LoginToken
with a leaseDurationSeconds
.token
- must not be null.leaseDurationSeconds
- the lease duration in seconds, must not be negative.VaultToken
@Deprecated public static LoginToken renewable(char[] token, long leaseDurationSeconds)
renewable(char[], Duration)
for time unit
safety.LoginToken
with a leaseDurationSeconds
.token
- must not be null.leaseDurationSeconds
- the lease duration in seconds, must not be negative.VaultToken
public static LoginToken renewable(VaultToken token, Duration leaseDuration)
LoginToken
with a leaseDurationSeconds
.token
- must not be null.leaseDuration
- the lease duration, must not be null or negative.VaultToken
public static LoginToken renewable(char[] token, Duration leaseDuration)
LoginToken
with a leaseDurationSeconds
.token
- must not be null.leaseDuration
- the lease duration, must not be null or negative.VaultToken
public Duration getLeaseDuration()
public boolean isRenewable()
Copyright © 2016–2019 Pivotal Software, Inc.. All rights reserved.