Browse Source

Update POST.md

pull/14640/head
maliming 4 years ago
committed by GitHub
parent
commit
9927c719e1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      docs/en/Community-Articles/2022-11-14-How-to-add-a-custom-grant-type-in-OpenIddict/POST.md

5
docs/en/Community-Articles/2022-11-14-How-to-add-a-custom-grant-type-in-OpenIddict/POST.md

@ -1,11 +1,10 @@
# How to add a custom grant type in OpenIddict
## ITokenExtensionGrant
Create a class that inherits `ITokenExtensionGrant`, and then register it with the framework.
In the `MyTokenExtensionGrant` class below we try to get the token details. The `ForbidResult` handles the failure case and `SignInResult` returns a new token response.
Create a class that inherits `ITokenExtensionGrant`, and then register it with the framework.
You can pass more parameters to implement business checks.
In the `MyTokenExtensionGrant` class below we try to get the token details, The `ForbidResult` handles the failure case and `SignInResult` returns a new token response, You can pass more parameters to implement business checks.
```cs
public class MyTokenExtensionGrant : ITokenExtensionGrant

Loading…
Cancel
Save