Skip to content

A mock server for testing and building Digilocker based applications

Notifications You must be signed in to change notification settings

digilocker-tools/mock

Repository files navigation

Digilocker Mock Server

Mock server for Digilocker APIs.

Start

npm install
npm run start:dev

Default configuration

Click to expand
{
  issuer: 'http://localhost:3001',
  path: '/oidc',
  oidc: {
    clients: [
      {
        client_id: 'test',
        client_name: 'test',
        response_types: ['code'],
        token_endpoint_auth_method: 'none',
        application_type: 'web',
        redirect_uris: ['http://localhost:3001/callback'],
      },
    ],
    pkce: {
      methods: ['S256'],
      required: () => false,
    },
    scopes: [
      'openid',
      'offline_access',
      'profile',
      'email',
      'phone',
      'address'
    ],
    features: {
      devInteractions: {
        enabled: false,
      },
    },
    interactions: {
      url(_, interaction) {
        return `/interaction/${interaction.uid}`;
      },
    },
    cookies: {
      keys: [
        'gQMQym96H64-QInq7mvVX0nZEw0qUmcTA3bCpfnuR1h3YXNhgGJ0XLd17obmV8Gm',
      ],
    },
    jwks: {
      keys: [
        {
          kty: 'RSA',
          kid: 'UWXekTvfWi6o3wfYL9Wbd4f819MKevyQ0V4ksVn_YR0',
          use: 'sig',
          alg: 'RS256',
          e: 'AQAB',
          ...
        },
      ],
    },
  }
}

Routes

Authorization: /oidc/auth

References

  1. oidc-provider

About

A mock server for testing and building Digilocker based applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published