Poking around a bit in Servlet.Security.Oauth.Do_Post I see this
overriding
procedure Do_Post (Server : in Token_Servlet;
Request : in out Servlet.Requests.Request'Class;
Response : in out Servlet.Responses.Response'Class) is
type Auth_Params is new Auth.Parameters with record
Client_Id : Ada.Strings.Unbounded.Unbounded_String;
Client_Secret : Ada.Strings.Unbounded.Unbounded_String;
Has_Authorization : Boolean := False;
end record;
begin
if Pos > 0 then
Params.Client_Id := To_Unbounded_String (Auth (Auth'First .. Pos - 1));
Params.Client_Id := To_Unbounded_String (Auth (Pos + 1 .. Auth'Last));
Params.Has_Authorization := True;
end if;
Streams.JSON.Initialize (Stream, Output);
Response.Set_Content_Type ("application/json; charset=utf-8");
Server.Manager.Token (Params, Grant);
I wonder if the lines
Params.Client_Id := To_Unbounded_String (Auth (Auth'First .. Pos - 1));
Params.Client_Id := To_Unbounded_String (Auth (Pos + 1 .. Auth'Last));
are correct
Poking around a bit in Servlet.Security.Oauth.Do_Post I see this
I wonder if the lines Params.Client_Id := To_Unbounded_String (Auth (Auth'First .. Pos - 1)); Params.Client_Id := To_Unbounded_String (Auth (Pos + 1 .. Auth'Last)); are correct
the last might be Params.Client_Secret