Correct security and privacy guidance

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9c2eebc4-dcd5-4b85-8113-90772d818900
This commit is contained in:
Jesper Schulz-Wedde 2026-07-14 10:45:42 +02:00
parent 7a678d1aff
commit ec8f891954
34 changed files with 189 additions and 150 deletions

View file

@ -1,19 +1,14 @@
codeunit 50214 "Sec Sample NonDebug Bad"
{
procedure BuildConnectionString(ApiKey: SecretText): Text
procedure CallLegacyOnPremisesConsumer(ApiKey: SecretText)
var
PlainApiKey: Text;
begin
exit('Server=db.example.com;Key=' + ApiKey.Unwrap());
PlainApiKey := ApiKey.Unwrap();
InvokeLegacyConsumer(PlainApiKey);
end;
procedure ParseSessionToken(Response: HttpResponseMessage; var SessionToken: SecretText)
var
ResponseText: Text;
JsonObject: JsonObject;
JsonToken: JsonToken;
local procedure InvokeLegacyConsumer(ApiKey: Text)
begin
Response.Content.ReadAs(ResponseText);
JsonObject.ReadFrom(ResponseText);
JsonObject.Get('access_token', JsonToken);
SessionToken := JsonToken.AsValue().AsText();
end;
}