Freja eID Client is a C# client library aimed to ease integration of relying party back-end systems with Freja eID Relying Party API.
This client library provides a set of classes, interface and utility methods designed for accomplishing one of the following use cases:
- Authentication Services API Client
- initiation of an authentication request
- fetching a single authentication result based on authentication reference
- fetching multiple authentication results
- cancelling authentication request
SslSettings sslSettings = SslSettings.Create("/path/to/keystore.pkcs12", "SuperSecretKeystorePassword", "/path/to/server/certificate.crt");
Create authentication client
IAuthenticationClient authenticationClient = AuthenticationClient.Create(sslSettings, FrejaEnvironment.TEST).Build<AuthenticationClient>();
Initiate request
InitiateAuthenticationRequest request = InitiateAuthenticationRequest.CreateDefaultWithEmail("email@example.com");
string reference = authenticationClient.Initiate(request);
Poll for request
int maxWaitingTimeInSeconds = 30;
AuthenticationResult result = authenticationClient.PollForResult(AuthenticationResultRequest.Create(reference), maxWaitingTimeInSeconds);
Cancel request
authenticationClient.Cancel(CancelAuthenticationRequest.Create(reference));