Last active
January 10, 2017 19:25
-
-
Save aevitas/ca911cbf1356beb7422da40cadec460a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TokenProviderOptions | |
{ | |
public TokenProviderOptions(string path, string issuer, string audience, TimeSpan expiration, | |
SigningCredentials signingCredentials) | |
{ | |
Requires.NotEmpty(path, nameof(path)); | |
Requires.NotEmpty(issuer, nameof(issuer)); | |
Requires.NotEmpty(audience, nameof(audience)); | |
Requires.NotNull(signingCredentials, nameof(signingCredentials)); | |
Path = path; | |
Issuer = issuer; | |
Audience = audience; | |
Expiration = expiration; | |
SigningCredentials = signingCredentials; | |
} | |
public TokenProviderOptions(string issuer, string audience, SigningCredentials signingCredentials) | |
: this("/token", issuer, audience, TimeSpan.FromMinutes(10), signingCredentials) | |
{ | |
} | |
public string Path { get; } | |
public string Issuer { get; } | |
public string Audience { get; } | |
public TimeSpan Expiration { get; } | |
public SigningCredentials SigningCredentials { get; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment