File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1- import { BindingKey } from '@loopback/context' ;
1+ import { BindingKey , Constructor } from '@loopback/context' ;
22import { MetadataAccessor } from '@loopback/metadata' ;
33import { Strategy } from 'passport' ;
44
55import {
66 AuthenticateFn ,
77 AuthenticationConfig ,
88 AuthenticationMetadata ,
9+ EntityWithIdentifier ,
910 IAuthClient ,
1011 IAuthUser ,
1112} from './types' ;
@@ -51,6 +52,10 @@ export namespace AuthenticationBindings {
5152 export const CONFIG = BindingKey . create < AuthenticationConfig > (
5253 'sf.userAuthentication.config' ,
5354 ) ;
55+
56+ export const USER_MODEL = BindingKey . create <
57+ Constructor < EntityWithIdentifier >
58+ > ( 'sf.userAuthentication.userModel' ) ;
5459}
5560
5661export const USER_AUTHENTICATION_METADATA_KEY = MetadataAccessor . create <
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ export interface IAuthUser {
2020 password ?: string ;
2121}
2222
23+ export interface EntityWithIdentifier {
24+ getIdentifier ?( ) : string | undefined ;
25+ }
26+
2327export interface AuthenticationMetadata < T = void > {
2428 strategy : string ;
2529 options ?: Object ;
You can’t perform that action at this time.
0 commit comments