Description
Applies a caller-defined credential verifier to route authentication modes. Credentials are never logged or retained by this package.
App_Context
type App_Context is limited private;
Authenticate
procedure Authenticate
(Scheme : String;
Credential : String;
Authenticated : out Boolean;
Principal : out Ada.Strings.Unbounded.Unbounded_String)
Parameters
- Scheme
- Credential
- Authenticated
- Principal
Authorization
function Authorization
(X : Flyology.HTTP.Server.Applications.Exchange) return String
Return the authorization field for an authentication hook. Callers must not include the result in logs or metrics.
Parameters
- X
Borrowed request exchange
Return value
Authorization field or an empty string
Call
procedure Call
(Context : in out App_Context;
X : in out Flyology.HTTP.Server.Applications.Exchange;
Next : in out Components.Next_Handler)
Authentication middleware component.
Parameters
- Context
Typed application context
- X
Borrowed request exchange
- Next
Borrowed downstream continuation
Challenge
Challenge : String := "Bearer";
Components
with package Components is new
Flyology.HTTP.Server.Middleware (App_Context);