Skip to content

Demonstrate how to validate an ACS token in an ASP.NET Web API service

Notifications You must be signed in to change notification settings

wadewegner/ValidateACSTokenWebAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ValidateACSTokenWebAPI

Demonstrate how to validate an ACS token in an ASP.NET Web API service.

Special thanks to @woloski for quickly (and ably) putting together the SimpleWebToken library for parsing and validating simple web tokens and @vibronet for pointing me towards ASP.NET Web API DelegatingHandler.

Usage

Two steps for updating:

  1. Update TokenValidationHandler.cs and replace "yourtokensigningkey" with your key from the Access Control Service:
var validator = new SimpleWebTokenValidator 
{
	SharedKeyBase64 = "yourtokensigningkey"	
};
  1. Update AccessControlResources.xaml and replace "youracsnamespace" and "yourrealmname" with the values you specified in the Access Control Service:
    <system:String x:Key="acsNamespace">youracsnamespace</system:String>
    <system:String x:Key="realm">uri:yourrealmname</system:String>

Enjoy!

About

Demonstrate how to validate an ACS token in an ASP.NET Web API service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published