https://github.com/i-rzr-i/onetimerequesttoken
Provide a simple solution to protect the application endpoint from untrusted or unwanted requests by supplying every invoked endpoint with a generated security code.
https://github.com/i-rzr-i/onetimerequesttoken
antiforgery code endpoint http protect secure token
Last synced: 4 months ago
JSON representation
Provide a simple solution to protect the application endpoint from untrusted or unwanted requests by supplying every invoked endpoint with a generated security code.
- Host: GitHub
- URL: https://github.com/i-rzr-i/onetimerequesttoken
- Owner: I-RzR-I
- License: mit
- Created: 2024-09-23T12:22:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-11T16:04:44.000Z (over 1 year ago)
- Last Synced: 2025-09-20T11:51:02.567Z (9 months ago)
- Topics: antiforgery, code, endpoint, http, protect, secure, token
- Language: C#
- Homepage:
- Size: 119 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> **Note** This repository is developed using .netstandard2.0.
| Name | Details |
|----------|----------|
| OneTimeRequestToken | [](https://www.nuget.org/packages/OneTimeRequestToken/) [](https://www.nuget.org/packages/OneTimeRequestToken)|
The base idea of the current repository is to provide in some cases a secure way to call application endpoints. So from the repository name, you can understand that the core is to generate a token for every application URL.
In the basic flow, you generate a token for an endpoint, and then before executing a request to the resource, you must add to the header generated token.
In the current implementation request validation is realized with a middleware. By default, middleware will search for a token in every request sent with `HTTP` method = `POST`.
Also, validation will be triggered by a `GET` request if in the HTTP header, the token is found.
To understand more efficiently how you can use available functionalities please consult the [using documentation/file](docs/usage.md).
**In case you wish to use it in your project, u can install the package from nuget.org** or specify what version you want:
> `Install-Package OneTimeRequestToken -Version x.x.x.x`
## Content
1. [USING](docs/usage.md)
1. [CHANGELOG](docs/CHANGELOG.md)
1. [BRANCH-GUIDE](docs/branch-guide.md)