0.5.17 • Published 9 months ago

@bleco/oidp v0.5.17

Weekly downloads
-
License
MIT
Repository
-
Last release
9 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.17

9 months ago

0.5.16

1 year ago

0.5.14

2 years ago

0.5.15

2 years ago

0.5.10

2 years ago

0.5.11

2 years ago

0.5.12

2 years ago

0.5.13

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.6

2 years ago

0.5.5

2 years ago

0.5.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.9

2 years ago

0.4.10

2 years ago

0.4.15

2 years ago

0.4.16

2 years ago

0.4.13

2 years ago

0.4.14

2 years ago

0.4.11

2 years ago

0.4.12

2 years ago

0.4.9

2 years ago

0.4.8

2 years ago

0.4.7

2 years ago

0.3.21

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.6

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.3.17

2 years ago

0.3.16

2 years ago

0.3.20

2 years ago

0.3.19

2 years ago

0.3.18

2 years ago

0.3.9

2 years ago

0.3.15

2 years ago

0.3.14

2 years ago

0.3.13

2 years ago

0.3.12

2 years ago

0.3.11

2 years ago

0.3.10

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago