Class BearerCredentialHeader
- Namespace
- MailFathom.Infrastructure.Security.OAuth
- Assembly
- MailFathom.Infrastructure.dll
Reads the credential out of an HTTP Authorization header.
public static class BearerCredentialHeader
- Inheritance
-
BearerCredentialHeader
- Inherited Members
Remarks
Both credentials the MCP endpoint accepts arrive the same way, as an RFC 6750 bearer credential, so both are lifted out of the header by this one parser. Keeping it in one place matters more than its size: an API key and an access token that disagreed about what counts as a well-formed header would be two different definitions of "the request presented nothing", and a request could then be malformed to one and a credential to the other.
Methods
- TryRead(string?, out string)
Reads the credential an
Authorizationheader value carried.