Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

PowelSICore/erl.AspNetCore.AgsToken

 
 

Repository files navigation

Middelware for secure services on ArcGIS Server

Available as NuGet erl.AspNetCore.AgsToken.

This middelware will fetch an AGS access token and attach it to the incoming request.

Access tokens are cached for their lifetime and reused. Remember to include following NuGet packages.

public void ConfigureServices(IServiceCollection services)
{
	services.AddOptions();
	services.AddMemoryCache(); // caching of AGS tokens

	// configuration: AGS token middelware
	services.Configure<AgsOptions>(options =>
	{   
		_configuration.GetSection("ArcGisServer").Bind(options);
	});
}

public void Configure(IApplicationBuilder app)
{
	app.UseMiddleware<AgsTokenMiddleware>();
}

Orginallly developed for proxying OAuth2 to AGS token using Microsoft.AspNetCore.Proxy.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%