Ensure that a file processing session is created, which is then used to refer to the processes it takes.
SignAPI creates a session folder that uses the session ID as folder name
The Service provider's application sends the following GET request using TLS:
The request must contain an Authorization header with an OAuth Introspect access token obtained via Integration Platform a Service provider's credentials grant flow.
Introspect piekļuves talona (token) saņemšana
This operation obtains an OAuth 2.0 access token. This operation can be invoked as part of an OAuth 2.0 Service provider's credentials grant flow.
Introspect access token
When the Service provider's credentials grant flow is used, the obtained access token demonstrates the administrative authorization of the Service provider's application making the call for accessing certain resources or services (i.e., without direct intervention of the resource's owner), or for accessing resources of the Service provider's application. Token is issued when the authorization server that processes the request is not associated to an identity provider. A token of this type can be used for accessing resources not associated to end-users or to end-user resources of any domain.
This type of access token is used to get access to Signature creation and validation service API's
To obtain the token, the Service provider's application must send a request like the following to authorization server using TLS. This request is sent directly from the Service provider’s application to authorization server and does not go via the browser.
In HTTP POST request is necessary to incorporated the following main attribute: Authorization – API access token.
How to generate API Access Key
Before Service provider access Integration platform API, LVRTC shall register Service provider as customer of Integration platform. After signing a contract with LVRTC (Test of Production environment) LVRTC generates Service Provider’s application identifier – (client_id) and shared secret (client_secret), intended for the customer usage.
API Access Key (API Key) is generated from the Service provider’s application identifier (client_id), a secret shared with the platform (client_secret) on the following basis:
Service provider's application identifier client_id are converted using the UTF-8 character encoding and URL encoding conditions.
|For example, value "Portāls" conversion result is "port%C4%81ls".|
Service provider's application password client_secret is converted by using the UTF-8 character encoding and URL encoding conditions.
|For example, value "drošība" conversion result is "dro%C5%A1%C4%ABba".|
Both values of the previous two steps must be combined with separator colon “:” between them.
|For example, by using previous examples, the result will be "port%C4%81ls:dro%C5%A1%C4%ABba".|
Obtained value must be converted using base 64 encoding without line breaks.
|For example, values "port%C4%81ls:dro%C5%A1%C4%ABba" conversion result is "CG94ydCVDNCUMWxzOmRybyVDNSVBMSVDNCVBQmJh".|
"MIME Tools" tool in "Notepad + +" can be used for this purpose.
The content of the request for Introspect access token (used for access SignAPI service):
Must have the client_credentials value .
|scope||mandatory||Must have the urn:safelayer:eidas:oauth:token:introspect value|
Example (Introspect access token)
The following example shows a situation in which the Service provider’s application with the identifier "Portal" and the password "drošība" authority shall transmit the request to the server with the identifier "lvrtc-eips-as":
In response, Integration platform authorization server issues a bearer-type OAuth 2.0 access token and returns it in a JSON structure.
|Access token generated by Authorization server. The token has the characteristics specified in the configuration of the authorization server that processed the request and consists of a random string of the number of bytes specified in the Access token number of random bytes (by default, 32), encoded in hexadecimal.|
|Type of access token. Always has the "bearer" value. (Bearer type OAuth 2.0 access token).|
|Lifetime (in seconds) of the access token. The Service provider’s application must perform the access the token authorizes before the token expires. This value can be configured in the Token timeout option of the authorization server (by default, 120 seconds). Once this timeout has expired, the token becomes invalid, and the Service provider’s application must obtain another one if it wants to continue invoking the protected services.|
Introspect access token:
File processing session identifier.