KestrunHostAuthnExtensions.AddOAuth2Authentication method
Adds OAuth2 authentication to the Kestrun host.
Use this for applications that require OAuth2 authentication.
public static KestrunHost AddOAuth2Authentication(this KestrunHost host,
string authenticationScheme = "OAuth2", string? displayName = "OAuth2 Authentication",
OAuth2Options? configureOptions = null)
| parameter | description |
|---|---|
| host | The Kestrun host instance. |
| authenticationScheme | The authentication scheme name. |
| displayName | The display name for the authentication scheme. |
| configureOptions | The OAuth2Options to configure the authentication. |
Return Value
The configured KestrunHost instance.
See Also
- class KestrunHost
- class OAuth2Options
- class KestrunHostAuthnExtensions
- namespace Kestrun.Hosting