Class SimpleWebSecurityToken
- Namespace
- Microsoft.ServiceBus
- Assembly
- Microsoft.ServiceBus.dll
A security token that wraps a Simple Web Token.
public class SimpleWebSecurityToken : SecurityToken
- Inheritance
-
SimpleWebSecurityToken
- Derived
Constructors
SimpleWebSecurityToken(string)
Initializes a new instance of the SimpleWebSecurityToken class with the specified Simple Web Token.
public SimpleWebSecurityToken(string tokenString)
Parameters
tokenString
stringA string that represents the Simple Web Token.
SimpleWebSecurityToken(string, DateTime)
Initializes a new instance of the SimpleWebSecurityToken class with the specified Simple Web Token and expiry date.
public SimpleWebSecurityToken(string tokenString, DateTime expiry)
Parameters
tokenString
stringA string that represents the Simple Web Token.
expiry
DateTimeThe expiry date of the simple web token.
SimpleWebSecurityToken(string, DateTime, string)
Initializes a new instance of the SimpleWebSecurityToken class.
public SimpleWebSecurityToken(string tokenString, DateTime expiry, string audience)
Parameters
tokenString
stringA string that represents the Simple Web Token.
expiry
DateTimeThe expiry date of the simple web token.
audience
stringThe audience for the simple web token.
SimpleWebSecurityToken(string, string)
Initializes a new instance of the SimpleWebSecurityToken class with the specified token ID and Simple Web Token.
public SimpleWebSecurityToken(string id, string tokenString)
Parameters
id
stringA unique identifier for the Simple Web Token.
tokenString
stringA string that represents the Simple Web Token.
Exceptions
- NullReferenceException
The
id
parameter ortokenString
parameter is null.
Properties
Audience
Gets the audience for the simple web token.
public string Audience { get; }
Property Value
- string
The audience for the simple web token.
AudienceFieldName
Gets the audience field name.
protected virtual string AudienceFieldName { get; }
Property Value
- string
The audience field name.
ExpiresOn
Gets the date and time the security token will expire.
public DateTime ExpiresOn { get; }
Property Value
- DateTime
The date and time the security token will expire.
ExpiresOnFieldName
Gets the field name associated with the token expiration.
protected virtual string ExpiresOnFieldName { get; }
Property Value
- string
The field name associated with the token expiration.
Id
Gets the ID associated with the Simple Web Token.
public override string Id { get; }
Property Value
- string
The ID associated with the Simple Web Token.
KeyValueSeparator
Gets the key value separator associated with the token.
protected virtual string KeyValueSeparator { get; }
Property Value
- string
The key value separator associated with the token.
PairSeparator
Gets the pair separator associated with the token.
protected virtual string PairSeparator { get; }
Property Value
- string
The pair separator associated with the token.
SecurityKeys
Gets the cryptographic keys associated with the security token.
public override ReadOnlyCollection<SecurityKey> SecurityKeys { get; }
Property Value
- ReadOnlyCollection<SecurityKey>
A ReadOnlyCollection<T> of type System.IdentityModel.Tokens.SecurityKey that contains the set of keys associated with the Simple Web Token.
Token
Gets the Simple Web Token.
public string Token { get; }
Property Value
- string
The Simple Web Token.
ValidFrom
Not implemented.
public override DateTime ValidFrom { get; }
Property Value
- DateTime
Throws a NotImplementedException.
ValidTo
Not implemented.
public override DateTime ValidTo { get; }
Property Value
- DateTime
Throws a NotImplementedException.