SecurityToken Class

  • java.lang.Object
    • com.microsoft.azure.servicebus.security.SecurityToken

public class SecurityToken

This class encapsulates the details of a security token.

Constructor Summary

Constructor Description
SecurityToken(SecurityTokenType tokenType, String tokenAudience, String tokenValue, Instant validFrom, Instant validUntil)

Creates an instance of security token.

Method Summary

Modifier and Type Method and 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 validity

Instant getValidUntil()

Gets the end time of this token validity.

Constructor Details

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 presented
tokenValue - string representation of the token value
validFrom - Instant from when this token is valid
validUntil - Instant when this token expires

Method Details

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

getTokenType

public SecurityTokenType getTokenType()

Gets the type of this security token.

Returns:

security token type

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

Applies to