SharpGrip.OpenIddict.Api.Validation
1.0.0-beta1
Prefix Reserved
dotnet add package SharpGrip.OpenIddict.Api.Validation --version 1.0.0-beta1
NuGet\Install-Package SharpGrip.OpenIddict.Api.Validation -Version 1.0.0-beta1
<PackageReference Include="SharpGrip.OpenIddict.Api.Validation" Version="1.0.0-beta1" />
paket add SharpGrip.OpenIddict.Api.Validation --version 1.0.0-beta1
#r "nuget: SharpGrip.OpenIddict.Api.Validation, 1.0.0-beta1"
// Install SharpGrip.OpenIddict.Api.Validation as a Cake Addin #addin nuget:?package=SharpGrip.OpenIddict.Api.Validation&version=1.0.0-beta1&prerelease // Install SharpGrip.OpenIddict.Api.Validation as a Cake Tool #tool nuget:?package=SharpGrip.OpenIddict.Api.Validation&version=1.0.0-beta1&prerelease
SharpGrip OpenIddict API
Builds
Introduction
SharpGrip OpenIddict API is an extension of the OpenIddict library exposing the OpenIddict entities through a RESTful API.
Installation
Reference NuGet package SharpGrip.OpenIddict.Api
(https://www.nuget.org/packages/SharpGrip.OpenIddict.Api).
Follow the OpenIddict installation guide Getting started and call the AddApi<TKey>
extension method on
the OpenIddictEntityFrameworkCoreBuilder
.
serviceCollection.AddOpenIddict().AddCore(options =>
{
options.UseEntityFrameworkCore()
.UseDbContext<ApplicationDbContext>()
.AddApi<long>();
});
Configuration
In case you are overriding the OpenIddict entities you need to use the AddApi<TApplication, TAuthorization, TScope, TToken, TKey>
overload to make sure the API is working with the correct entity
types.
Both AddApi
extension methods expose an options builder with which you can configure your API. In the example below the Application
API route will become /open-id-api/application
and the
endpoints exposed in that route will require an
access token with the my_application_access_scope
scope.
serviceCollection.AddOpenIddict().AddCore(options =>
{
options.UseEntityFrameworkCore()
.UseDbContext<ApplicationDbContext>()
.AddApi<OpenIdApplication, OpenIdAuthorization, OpenIdScope, OpenIdToken, long>(apiOptions =>
{
apiOptions.ApiRoutePrefix = "open-id-api";
apiOptions.ApplicationApiRoute = "application";
apiOptions.ApplicationApiAccessScope = "my_application_access_scope";
});
});
Properties
Property | Default value | Description |
---|---|---|
ApiRoutePrefix | api/open-id |
The prefix used in all the API routes. |
ApplicationApiRoute | application |
The Application API route. |
ApplicationApiAccessScope | open_id_application_api_access |
The access scope needed to access the Application endpoints. |
AuthorizationApiRoute | authorization |
The Authorization API route. |
AuthorizationApiAccessScope | open_id_authorization_api_access |
The access scope needed to access the Authorization endpoints. |
ScopeApiRoute | scope |
The Scope API route. |
ScopeApiAccessScope | open_id_scope_api_access |
The access scope needed to access the Scope endpoints. |
TokenApiRoute | token |
The Token API route. |
TokenApiAccessScope | open_id_token_api_access |
The access scope needed to access the Token endpoints. |
Supported operations
Please find below an overview of the supported operations using the default route configuration.
Application
Method | Endpoint | Description | Parameters |
---|---|---|---|
GET |
api/open-id/application |
Returns all applications. | |
GET |
api/open-id/application/{id} |
Returns an application by ID. | string id |
POST |
api/open-id/application |
Creates an application. | ApplicationCreateModel |
PUT |
api/open-id/application/{id} |
Updates an application by ID. | string id & ApplicationUpdateModel |
DELETE |
api/open-id/application/{id} |
Deletes an application by ID. | string id |
Authorization
Method | Endpoint | Description | Parameters |
---|---|---|---|
GET |
api/open-id/authorization |
Returns all authorizations. | |
GET |
api/open-id/application/{id} |
Returns an authorization by ID. | string id |
Scope
Method | Endpoint | Description | Parameters |
---|---|---|---|
GET |
api/open-id/scope |
Returns all scopes. | |
GET |
api/open-id/scope/{id} |
Returns a scope by ID. | string id |
POST |
api/open-id/scope |
Creates a scope. | ScopeCreateModel |
PUT |
api/open-id/scope/{id} |
Updates a scope by ID. | string id & ScopeUpdateModel |
DELETE |
api/open-id/scope/{id} |
Deletes a scope by ID. | string id |
Token
Method | Endpoint | Description | Parameters |
---|---|---|---|
GET |
api/open-id/token |
Returns all tokens. | |
GET |
api/open-id/token/{id} |
Returns a token by ID. | string id |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- FluentValidation (>= 10.4.0)
- OpenIddict.Abstractions (>= 3.0.0)
- SharpGrip.OpenIddict.Api.Models (>= 1.0.0-beta1)
-
.NETStandard 2.1
- FluentValidation (>= 10.4.0)
- OpenIddict.Abstractions (>= 3.0.0)
- SharpGrip.OpenIddict.Api.Models (>= 1.0.0-beta1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SharpGrip.OpenIddict.Api.Validation:
Package | Downloads |
---|---|
SharpGrip.OpenIddict.Api
SharpGrip OpenIddict API is an extension of the OpenIddict library exposing the OpenIddict entities through a RESTful API. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-beta1 | 786 | 8/6/2023 |
1.0.0-alpha1 | 419 | 10/28/2022 |