Class CloudFoundryTokenValidator
Inheritance
System.Object
CloudFoundryTokenValidator
Namespace: Steeltoe.Security.Authentication.CloudFoundry
Assembly: Steeltoe.Security.Authentication.CloudFoundryBase.dll
Syntax
public class CloudFoundryTokenValidator : object
Constructors
| Edit this page View SourceCloudFoundryTokenValidator(AuthServerOptions)
Declaration
public CloudFoundryTokenValidator(AuthServerOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
AuthServerOptions | options |
Methods
| Edit this page View SourceValidateAudience(IEnumerable<String>, SecurityToken, TokenValidationParameters)
Validate that a token was meant for approved audience(s)
Declaration
public virtual bool ValidateAudience(IEnumerable<string> audiences, SecurityToken securityToken, TokenValidationParameters validationParameters)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | audiences | The list of audiences the token is valid for |
SecurityToken | securityToken | [Not used] The token being validated |
TokenValidationParameters | validationParameters | [Not used] |
Returns
Type | Description |
---|---|
System.Boolean | true if the audience matches the client id or any value in AdditionalAudiences |
ValidateIssuer(String, SecurityToken, TokenValidationParameters)
Validate that a token was issued by UAA
Declaration
public virtual string ValidateIssuer(string issuer, SecurityToken securityToken, TokenValidationParameters validationParameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | issuer | Token issuer |
SecurityToken | securityToken | [Not used] Token to validate |
TokenValidationParameters | validationParameters | [Not used] |
Returns
Type | Description |
---|---|
System.String | The issuer, if valid, else null |
ValidateScopes(JwtSecurityToken)
This method validates scopes provided in configuration, to perform scope based Authorization
Declaration
protected virtual bool ValidateScopes(JwtSecurityToken validJwt)
Parameters
Type | Name | Description |
---|---|---|
JwtSecurityToken | validJwt | JSON Web token |
Returns
Type | Description |
---|---|
System.Boolean | true if scopes validated |