public class LoginToken extends VaultToken
Modifier and Type | Class and Description |
---|---|
static class |
LoginToken.LoginTokenBuilder
Builder for
LoginToken . |
Modifier and Type | Method and Description |
---|---|
static LoginToken.LoginTokenBuilder |
builder() |
String |
getAccessor() |
Duration |
getLeaseDuration() |
String |
getType() |
boolean |
isBatchToken() |
boolean |
isRenewable() |
boolean |
isServiceToken() |
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 . |
String |
toString() |
equals, getToken, hashCode, toCharArray
public static LoginToken.LoginTokenBuilder builder()
LoginToken.LoginTokenBuilder
.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()
@Nullable public String getAccessor()
@Nullable public String getType()
isBatchToken()
,
#isServiceToken())
public boolean isBatchToken()
public boolean isServiceToken()
public String toString()
toString
in class VaultToken
Copyright © 2016–2024 Pivotal Software, Inc.. All rights reserved.