Skip to content

HermitAS/HelseID.Samples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HelseID Samples

HelseID is a national authentication service for the health sector in Norway. These samples are targeted at technical personel such as application architects and developers.

Overview of Samples

  1. Client Authentication
  2. Sample API
  3. API Access
    1. API Access with new access token
    2. API Access with resource indicators
  4. Client Credentials Grant
    1. Client Credentials with Child Organization
    2. Client Credentials with JWK
    3. Client Credentials with Enterprise Certificate
  5. Generate a JSON Web Key (JWK)
  6. Refresh Token
  7. Token Exchange
  8. Request Objects
  9. Backend for Frontend (BFF)

Client Authentication

The sample demonstrates how a client can be authenticated through HelseID by using a Json Web Key (JWK) pair. See HelseId.ClientAuthentication for a more detailed explanation of the authentication process.

Sample API

Some of the HelseID samples demonstrate how a client can access an API. Thus, a sample API has been created such that other HelseID samples can access it. The API requires authentication before the client is granted access. The API should be run locally before trying to connect through another HelseID sample. See HelseId.SampleAPI for a more detailed explanation.

API Access

The sample demonstrate how a client can be authenticated through HelseID and get access to the restricted Sample API with an access token. See HelseId.APIAccess for a more detailed explanation.

API Access with new access token

In this sample one can also access the API with a new access token. This is done to make sure that the token has as few scopes/accesses as possible. See HelseId.APIAccessNewToken for a more detailed explanation.

API Access with resource indicators

The sample demonstrate how resource indicators are used to download multiple access tokens without performing multiple calls to the authorization endpoint. Each access token can then be used to call a specified API. See HelseId.Samples.ResourceIndicatorsDemo for more information.

Client Credentials Grant

Simple demonstration of client credentials grant. See HelseId.Samples.ClientCredentials for more information.

Client Credentials with Child Organization

A modification of the HelseId.Samples.ClientCredentials sample, where a child organization is added as well. See HelseId.Samples.ClientCredentialsWithUnderenhet.

Client Credentials with JWK

A modification of the HelseId.Samples.ClientCredentials sample, where JWK is used as secret. See HelseId.Samples.ClientCredentials.Jwk for more information.

Client Credentials with Enterprise Certificate

A modification of the HelseId.Samples.ClientCredentials sample, where Enterprise Certificate is used as secret. See HelseId.Samples.EnterpriseCertificate.

Generate a JSON Web Key (JWK)

A command line program to generate a key pair as a JSON Web Key (JWK). The sample creates two files where the first file contains the whole key pair (including the private key), while the second file only contains the public key. See HelseId.RsaJwk for a more detailed explanation.

Refresh Token

Simple demonstration of refresh tokens. See HelseId.Samples.RefreshTokenDemo.

Token Exchange

Simple demonstration of token exchange. See HelseId.Samples.TokenExchangeDemo.

Request Objects

The sample demonstrates how to use request objects for client authentication against HelseID. See HelseId.Samples.RequestObjectsDemo.

Backend for Frontend (BFF)

See HelseId.Core.BFF.Sample.

More info on https://nhn.no/helseid/ (Norwegian) and https://dokumentasjon.helseid.no/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 87.5%
  • HTML 9.8%
  • CSS 2.3%
  • Other 0.4%