OpenID for ASP.NET Core

OpenID for ASP.NET Core

Fully compliant with the OpenID Connect specifications

OpenID for ASP.NET Core

Product Details

The OpenID Connect (OIDC) for ASP.NET Core library plugs directly into your application enabling OpenID provider support.

Successfully tested with Blazor WASM and ASP.NET Core clients.

Related Products

We also offer a SAML for ASP.NET Core library.

The combination of the OpenID Connect and SAML libraries enables OpenID Connect clients to participate in SSO with SAML identity providers.

OpenID for ASP.NET Core

What's included?

OpenID for ASP.NET Core Examples

Example Projects to Help You

OpenID ASP.NET Core projects written in C#, with full source code, are included.

The examples demonstrate:

  • Acting as the OpenID provider
  • Authentication
  • Logout
  • Supporting metadata requests
  • Supporting key requests
OpenID for ASP.NET Core API

High Level API

Add OpenID provider functionality to your web application with just a few lines of code.

A high-level, configuration-driven API hides the complexities of OpenID Connect, making for a quick and easy implementation.

Configuration changes, including adding support for additional clients, can be made with zero code updates.

Processing an OpenID Discovery Metadata Request

OpenID metadata is returned to the client.

            
[Route(".well-known/openid-configuration")]
[ResponseCache(Duration = 600, Location = ResponseCacheLocation.Any)]
public async Task GetMetadataAsync()
{
    // Return the OpenID provider's metadata.
    return await _openIDProvider.GetMetadataAsync();
}
            
        

Processing an OpenID Key Request

OpenID keys are returned to the client.

            
[Route("openid/keys")]
[ResponseCache(Duration = 600, Location = ResponseCacheLocation.Any)]
public async Task GetKeysAsync()
{
    // Return the OpenID provider's keys.
    return await _openIDProvider.GetKeysAsync();
}
            
        

Processing an OpenID Connect Authentication Request

The authorization request is received and processed.

            
[Route("openid/authorize")]
public async Task AuthorizeAsync()
{
    // Receive and process the OpenID Connect authentication request.
    var authenticationRequest = return await _openIDProvider.ReceiveAuthnRequestAsync();
}
            
        

Sending an OpenID Connect Authentication Response

The authorization response is created and sent.

            
[Route("openid/AuthenticationCompletion")]
public async Task AuthenticationCompletionAsync()
{
    // Create and send the OpenID Connect authentication response.
    return await _openIDProvider.SendAuthnResponseAsync(name, claims);
}
            
        
OpenID for ASP.NET Core Interoperability

Interoperability

ASP.NET Core example projects are included demonstrating interoperability with:

OpenID for ASP.NET Core Documentation

Documentation

Comprehensive documentation is available to guide you through implementation.

OpenID for ASP.NET Core Platform Support

Platform Support

The OpenID library supports ASP.NET Core 6.0 and above. All ASP.NET Core platforms, including Windows, Linux and macOS, are supported.

OpenID for ASP.NET Core Source Code

Source Code

For your assurance and convenience, the complete source code for the library is available for purchase.

Consulting Inquiries

For consulting and implementation inquires, feel free to contact us at [email protected].