0.5.16 • Published 3 months ago

@bleco/oidp v0.5.16

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

@bleco/oidp

A loopback 4 extension for integrating an oidc id provider

Setup

Configuration

oidp has some default configurations, but you can override it. It is aliased from ApplicationConfig.oidp.oidc.

Clients*

findAccount*

findAccount function is required.

import {OidcDataSourceName, OidpBindings, OidpComponent} from '@bleco/oidp';
import {Application} from '@loopback/core';

function setupOidp(app: Application) {
  // specify the custom FindAccount function to use in the oidc provider
  this.bind(OidpBindings.FIND_ACCOUNT).toProvider(SomeFindAccountProvider);
  app.component(OidpComponent);
}

AdapterFactory

@bleco/oidp has a builtin adapter factory based on loopback normal repository that can be used to create an adapter for OIDC provider.

Default Adapter Factory

import {OidcDataSourceName, OidpComponent} from '@bleco/oidp';
import {Application} from '@loopback/core';

function setupOidp(app: Application) {
  // specify the datasource to use in the default oidc adapter
  this.bind(`datasources.${OidcDataSourceName}`).toAlias('databases.some-oidc-database');
  app.component(OidpComponent);
}

Custom Adapter Factory

import {OidpComponent} from '@bleco/oidp';
import {Application} from '@loopback/core';

function setupOidp(app: Application) {
  app.configure(OidpBindings.COMPONENT).to({
    // disable builtin adapter factory
    enableDbAdapter: false,
  });
  // specify the custom adapter factory to use
  app.bind(OidpBindings.ADAPTER_FACTORY).toProvider(SomeOidpAdapterFactoryProvider);
  app.component(OidpComponent);
}

Custom Client

In addition to static clients oidc provider will use the adapter's find method when a non-static client_id is encountered.

0.5.16

3 months ago

0.5.14

5 months ago

0.5.15

5 months ago

0.5.10

6 months ago

0.5.11

6 months ago

0.5.12

6 months ago

0.5.13

5 months ago

0.5.4

7 months ago

0.5.3

8 months ago

0.5.6

6 months ago

0.5.5

7 months ago

0.5.0

8 months ago

0.5.2

8 months ago

0.5.1

8 months ago

0.5.8

6 months ago

0.5.7

6 months ago

0.5.9

6 months ago

0.4.10

10 months ago

0.4.15

8 months ago

0.4.16

8 months ago

0.4.13

9 months ago

0.4.14

8 months ago

0.4.11

9 months ago

0.4.12

9 months ago

0.4.9

11 months ago

0.4.8

11 months ago

0.4.7

11 months ago

0.3.21

12 months ago

0.4.5

12 months ago

0.4.4

12 months ago

0.4.6

11 months ago

0.4.1

12 months ago

0.4.0

12 months ago

0.4.3

12 months ago

0.4.2

12 months ago

0.3.17

1 year ago

0.3.16

1 year ago

0.3.20

1 year ago

0.3.19

1 year ago

0.3.18

1 year ago

0.3.9

1 year ago

0.3.15

1 year ago

0.3.14

1 year ago

0.3.13

1 year ago

0.3.12

1 year ago

0.3.11

1 year ago

0.3.10

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.8

1 year ago

0.3.7

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago