Class SecurityToken
- java.lang.Object
-
- com.microsoft.azure.servicebus.security.SecurityToken
-
public class SecurityToken extends Object
This class encapsulates the details of a security token.- Since:
- 1.2.0
-
-
Constructor Summary
Constructors Constructor Description SecurityToken(SecurityTokenType tokenType, String tokenAudience, String tokenValue, Instant validFrom, Instant validUntil)
Creates an instance of security token.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getTokenAudience()
Gets the path of the entity for which this token is to be presented.SecurityTokenType
getTokenType()
Gets the type of this security token.String
getTokenValue()
Gets the value of this token.Instant
getValidFrom()
Gets the start time of this token validityInstant
getValidUntil()
Gets the end time of this token validity.
-
-
-
Constructor Detail
-
SecurityToken
public SecurityToken(SecurityTokenType tokenType, String tokenAudience, String tokenValue, Instant validFrom, Instant validUntil)
Creates an instance of security token.- Parameters:
tokenType
-SecurityTokenType
tokenAudience
- path of the entity for which this security token is to be presentedtokenValue
- string representation of the token valuevalidFrom
- Instant from when this token is validvalidUntil
- Instant when this token expires
-
-
Method Detail
-
getTokenType
public SecurityTokenType getTokenType()
Gets the type of this security token.- Returns:
- security token type
-
getTokenAudience
public String getTokenAudience()
Gets the path of the entity for which this token is to be presented.- Returns:
- path of the entity for which this token is created
-
getTokenValue
public String getTokenValue()
Gets the value of this token.- Returns:
- string representation of the token value
-
getValidFrom
public Instant getValidFrom()
Gets the start time of this token validity- Returns:
- Instant from when this token is valid
-
getValidUntil
public Instant getValidUntil()
Gets the end time of this token validity.- Returns:
- Instant when this token expires
-
-