| Docs Help
  AppSource  
Docs  /  NVXWUL Web Utility Library  /  Tasks

Arbeiten mit der App


2024/06/27 • 5 min. to read

Web Authentifizierung

Within this Record endpoints and their Authentication Types and Authentication values are stored.

Authentifizierung Fields

Endpoint URLSpecifies the endpoint URL.
TypeSpecifies the authorization type.

OAuth, Fields

This authentication type can be used to retrieve tokens from Microsoft Identy Platform authorisation servers. The option "Client Credentials" is supported as an OAuth2 flow.
OAuth URLSpecifies the OAuth token endpoint.
Client IDSpecifies the client id.
Client SecretSpecifies the client secret.

Basic, Fields

UsernameSpecifies the username.
PasswordSpecifies the password.

Bearer Token, Fields

Bearer Token Login UrlSpecifies the Bearer Token Login Url.
Requires EncryptionSpecifies if the Login Url requires the credentials to be passed encrypted.
Bearer Token Json KeySpecifies the Key of the Json Value in the Http Response from the Bearer Token Login, which contains the Bearer Token.
UsernameSpecifies the username.
PasswordSpecifies the password.

Encryption, Fields

Encryption AlgorithmSpecifies the encryption algorithm to be used.
Encryption Key SecretSpecifies the key for a keyed cryptographic function.

API Key, Fields

API Key Header NameSpecifies the name of the request header to be used for the api key.
API KeySpecifies the api key.

OAuth-external, Fields

This authentication type can be used to retrieve tokens from authorisation servers outside the Microsoft Identy Platform. The option "Client Credentials" is supported as an OAuth2 flow.
OAuth2 FlowSpecifies which OAuth 2.0 flow you want to use.
OAuth URLSpecifies the OAuth token endpoint.
Client IDSpecifies the client id.
Client SecretSpecifies the client secret.
ScopeSpecifies the scope of the token. If empty then * will be used.

Actions

  • Test Credentials and Connection

    Sends a HTTP GET request with the provided credentials to the endpoint, to check if the endpoint can be reached and to check if the credentials are correct. If Bearer Token or OAuth2 authentication is being used, an additional request will be made to check if the provided credentials result in a valid token. The response of the tested webservice is being displayed as a message.
  • Create Test Webrequest

    Creates a test webrequest with this authentification.

Web Messages

With this Record HTTP Requests can be created and sent to the Endpoints, from the WebAuthentication Record. The sent Requests are being retent for one month.

Fields

Entry No.Specifies the number of the record.
Date and TimeSpecifies the date and time when the record was created.
MethodSpecifies the web request method.
Target URLSpecifies the targeted url.
PayloadSpecifies the sent payload of the request.
ResponseSpecifies the payload of the received response.
Response Reason PhraseSpecifies the http reason phrase of the received response.
Response Is Success StatusSpecifies if the http request was accepted or denied.
Response Status CodeSpecifies the http reason status code.

Procedures

    CreateMessage

    This Procedure creates a new WebMessage based on the given parameters.

    Parameters

    • RequestType Enum "Http Request Type" -> the HTTP Method of the Request to be sent
    • TargetURL Text[250] -> the URL of the Endpoint
    • RequestContent Text -> the Request Body

    AddWebMessageHeader

    Creates a HTTP Header for an exisiting WebMessage.

    Parameter

    • HeaderType Enum "WULWebMessageHeaderTypeNVX" -> Type of the HTTP Header (Request or Content Header)
    • Name Text -> Name of the Header
    • Value Text -> Value of the Header

    AddWebMessageAuthorization

    Creates a HTTP Header for the configured authorization for an exisiting WebMessage.

    Parameter

    • HeaderType Enum "WULWebMessageHeaderTypeNVX" -> Type of the HTTP Header (Request or Content Header)
    • WebAuthorization Record "WULWebAuthorizationNVX" -> the configured authorization

    SendMessage

    Sends an existing WebMessage to the specified Webservice.

    Parameter

    • var ResponseMessage: HttpResponseMessage -> the Response of the Receiver
procedure ExecuteWebService(Payload: Text; WebAuthorization: Record WULWebAuthorizationNVX; EndpointURL: Text)
var
    WebMessage: Record WULWebMessageNVX;
    ResponseMessage: HttpResponseMessage;
    BodyContent: Text;
    ResponseText: Text;
begin
    WebMessage.CreateMessage("Http Request Type"::POST, EndpointURL, BodyContent);
    WebMessage.AddWebMessageHeader(WULWebMessageHeaderTypeNVX::"Content Header", 'Content-Type', 'application/json');
    WebMessage.AddWebMessageAuthorization(WULWebMessageHeaderTypeNVX::"Request Header", WebAuthorization);
    Commit();
    WebMessage.SendMessage(ResponseMessage);
    Commit();
    ResponseText := WebMessage.GetResponse();
end;

Web Message Headers

This record stores and manages the HTTP Headers which shall be appended to the HTTP Request.

Fields

NameSpecifies the name of the header.
ValueSpecifies the value of the header.

MultiPart/Form-Data Helper

For the complex content-type MultiPart/Form-Data there is a helper codeunit for the createn of such contents added. MultiPart/Form-Data Helper

See also




Submit feedback for
DE|EN Imprint