API client that enables an application to call Swedish BankID's (svenskt BankIDs) REST API in .NET.
$ dotnet add package ActiveLogin.Authentication.BankId.ApiActiveLogin.Authentication enables an application to support Swedish BankID (svenskt BankID) authentication in .NET. Built on NET Standard and packaged as NuGet-packages they are easy to install and use on multiple platforms.
Free to use, commercial support and training is available if you need assistance or a quick start.
There is one Api for the "App API" and one for the "Verify API".
The constructor for the api client takes an HttpClient and you need to configure that HttpClient with a BaseAddress, Tls12, client certificates etc. depending on your needs.
The clients have these public methods.
App API:
public class BankIdAppApiClient : IBankIdAppApiClient
{
public Task<AuthResponse> AuthAsync(AuthRequest request) { ... }
public Task<SignResponse> SignAsync(SignRequest request) { ... }
public Task<PhoneAuthResponse> PhoneAuthAsync(PhoneAuthRequest request) { ... }
public Task<PhoneSignResponse> PhoneSignAsync(PhoneSignRequest request) { ... }
public Task<CollectResponse> CollectAsync(CollectRequest request) { ... }
public Task<CancelResponse> CancelAsync(CancelRequest request) { ... }
}
Verify API:
public class BankIdVerifyApiClient : IBankIdVerifyApiClient
{
public Task<VerifyResponse> VerifyAsync(VerifyRequest request) { ... }
}
For full documentation and samples, see the Readme in our GitHub repo.
Active Login is an Open Source project built on .NET that makes it easy to integrate with leading Swedish authentication services like BankID.
Active Login is built, maintained and sponsored by Active Solution. Active Solution is located in Stockholm (Sweden) and provides IT consulting with focus on web, cloud and AI.