Skip to content

Commit

Permalink
Adjusted case sensetive Authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
hunsche committed Oct 29, 2019
1 parent cac5b50 commit 9fab586
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Horse.JWT.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ interface
JOSE.Consumer.Validators, JOSE.Consumer, JOSE.Context, REST.JSON;

procedure Middleware(Req: THorseRequest; Res: THorseResponse; Next: TProc);
function HorseJWT(ASecretJWT: string; AHeader: string = 'authorization'): THorseCallback; overload;
function HorseJWT(ASecretJWT: string; ASessionClass: TClass; AHeader: string = 'authorization'): THorseCallback; overload;
function HorseJWT(ASecretJWT: string; AHeader: string = 'Authorization'): THorseCallback; overload;
function HorseJWT(ASecretJWT: string; ASessionClass: TClass; AHeader: string = 'Authorization'): THorseCallback; overload;

implementation

Expand All @@ -16,14 +16,14 @@ implementation
SessionClass: TClass;
Header: string;

function HorseJWT(ASecretJWT: string; AHeader: string = 'authorization'): THorseCallback; overload;
function HorseJWT(ASecretJWT: string; AHeader: string = 'Authorization'): THorseCallback; overload;
begin
SecretJWT := ASecretJWT;
Header := AHeader;
Result := Middleware;
end;

function HorseJWT(ASecretJWT: string; ASessionClass: TClass; AHeader: string = 'authorization'): THorseCallback; overload;
function HorseJWT(ASecretJWT: string; ASessionClass: TClass; AHeader: string = 'Authorization'): THorseCallback; overload;
begin
Result := HorseJWT(ASecretJWT, AHeader);
SessionClass := ASessionClass;
Expand Down

0 comments on commit 9fab586

Please sign in to comment.