HTTP Authentication Validation
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
I have been using the HttpServer of this library to build a REST API along side a websocket event system for a service I am building. The current version works with Basic authentication perfectly fine and is a great way of limiting connections.
However, I wish to build on this and use a permission system that I have devised. This permission system is boiled down to a iidentity and a list of permissions in a lookup table. While the websocket behaviours make it easy to get the identity of a connection using this.Context.User, there is seems to be no such thing within the HttpServer class itself.
This is preventing my HTTP Get listeners from verifying a connection and their identity against my table of permissions. The HttpRequestEventArgs contains no information about the identity of the user, besides the raw authentication within the headers.
A solution to this would be to use the headers with a key, however I wish to avoid that for now and try to work out a pure http authentication way around it. Is there a way to do this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the HttpServer and HttpRequestEventArgs entry points, then compare them with the websocket behavior that exposes this.Context.User. Determine how HTTP GET listeners could access authenticated identity information beyond raw request headers. Done should provide a documented, consistent way for HTTP handlers to validate identity and permissions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, authentication, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100