Per impostazione predefinita, quando OAuth2 è abilitato lato server, tutte le richieste HTTP richiedono l'autenticazione tramite Bearer Token.
Se si desidera consentire l'accesso ad alcuni URL senza la necessità di utilizzare un Bearer Token, è possibile utilizzare l'evento OnOAuth2BeforeRequest
procedure OnOAuth2BeforeRequest(Sender: TObject; aConnection: TsgcWSConnection; aHeaders: TStringList;
var Cancel: Boolean);
begin
if DecodeGETFullPath(aHeaders) = '/Public.html' then
Cancel := True
else if DecodePOSTFullPath(aHeaders) = '/Form.html' then
Cancel := True;
end;