3using System.Threading.Tasks;
45 string ServerUrl = sb.ToString();
48 string AuthorizeUri = sb.ToString();
63 Dictionary<string, object> MetaData =
new Dictionary<string, object>()
65 {
"issuer", ServerUrl },
66 {
"authorization_endpoint", AuthorizeUri },
67 {
"token_endpoint", TokenUri },
68 {
"scopes_supported", OAuthScopesSupportedAttribute.RegisteredScopes },
69 {
"token_endpoint_auth_methods_supported",
new string[]
71 "client_secret_basic",
76 {
"response_types_supported",
new string[] {
"code",
"token" } },
77 {
"code_challenge_methods_supported",
new string[] {
"plain",
"S256" } },
78 {
"authorization_response_iss_parameter_supported", this.JwtFactory.HasIssuer },
79 {
"grant_types_supported", GrantTypesSupported.
ToArray() }
91 MetaData[
"introspection_endpoint_auth_methods_supported"] =
new string[]
93 "client_secret_basic",
98 await Response.
Return(MetaData);
Represents an HTTP request.
string ResourceName
Name of resource.
Represets a response of an HTTP client request.
Task Return(Exception ex)
Returns an error to the client.
Manages the OAuth 2 environment.
bool HasIntrospectionResource
If the environment has a registered introspection resource
OAuthIntrospectionResource IntrospectionResource
Registered introspection resource
OAuthDeviceAuthorizationResource DeviceAuthorizationResource
Registered device authorization resource
OAuthAuthorizeResource AuthorizeResource
Registered authorization resource
OAuthRegistrationResource RegistrationResource
Registered registration resource
void Register(OAuthAuthorizeResource? AuthorizeResource)
Registers an authorization resource.
bool HasRegistrationResource
If the environment has a registered registration resource
bool HasDeviceAuthorizationResource
If the environment has a registered device authorization resource
OAUTH device authorization resource, as defined in RFC 8628. https://datatracker.ietf....
const string GrantType
Grant Type for device authorization flow.
Abstract base class for OAUTH resources.
OAuth2Environment Environment
OAUTH2 environment, used to access clients, tokens, and other resources.
OAUTH token resource, as defined in RFC 6749. https://datatracker.ietf.org/doc/html/rfc6749
const string DefaultResourcePath
Default token resource path: /oauth/token
A chunked list is a linked list of chunks of objects of type T .
void Add(T Item)
Adds an item to the collection.
T[] ToArray()
Returns an array containing all elements of the collection.
Abstract base class for JWS algorithm.
static string[] GetAlgorithmNames()
Gets the names of available JWS algorithms.
GET Interface for HTTP resources.