Skip to content

Commit

Permalink
Fix compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stcarrez committed Jun 10, 2018
1 parent d585dcb commit aaef962
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/security-oauth-file_registry.adb
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ package body Security.OAuth.File_Registry is
App : in Servers.Application'Class;
Scope : in String;
Auth : in Servers.Principal_Access) return String is
pragma Unreferenced (Realm, App);
File_Auth : constant File_Principal_Access := File_Principal (Auth.all)'Access;
begin
for P of Security.Permissions.Get_Permission_Array (Scope) loop
Expand Down Expand Up @@ -279,8 +280,9 @@ package body Security.OAuth.File_Registry is
procedure Verify (Realm : in out File_Realm_Manager;
Token : in String;
Auth : out Servers.Principal_Access) is
pragma Unreferenced (Realm);
begin
Log.Info ("Verify token {0}", Token);
Log.Info ("Verify token {0}: refused", Token);
Auth := null;
end Verify;

Expand Down
5 changes: 3 additions & 2 deletions src/security-oauth-servers.adb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ package body Security.OAuth.Servers is
begin
if Decode then
declare
Decoder : constant Util.Encoders.Decoder := Util.Encoders.Create (Util.Encoders.BASE_64_URL);
Decoder : constant Util.Encoders.Decoder
:= Util.Encoders.Create (Util.Encoders.BASE_64_URL);
Content : constant String := Decoder.Decode (Key);
begin
Manager.Private_Key := To_Unbounded_String (Content);
Expand Down Expand Up @@ -329,7 +330,7 @@ package body Security.OAuth.Servers is
Grant.Expires := Ada.Calendar.Clock + App.Expire_Timeout;
Grant.Expires_In := App.Expire_Timeout;
Grant.Error := null;
Realm.Create_Token (Realm.Realm.Authorize (App, Scope, Grant.Auth), Grant);
Realm.Create_Token (Realm.Realm.Authorize (App, SCOPE, Grant.Auth), Grant);
end if;
end if;
end if;
Expand Down
3 changes: 1 addition & 2 deletions src/security-policies-urls.adb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----------------------------------------------------------------------
-- security-policies-urls -- URL security policy
-- Copyright (C) 2010, 2011, 2012, 2016 Stephane Carrez
-- Copyright (C) 2010, 2011, 2012, 2016, 2018 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -20,7 +20,6 @@ with Ada.Unchecked_Deallocation;

with Util.Beans.Objects;
with Util.Beans.Objects.Vectors;
with Util.Serialize.Mappers;
with Util.Serialize.Mappers.Record_Mapper;

with Security.Controllers.URLs;
Expand Down

0 comments on commit aaef962

Please sign in to comment.