mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 14:47:12 -04:00
Added oauth provider.
This commit is contained in:
parent
c4a2bde81c
commit
7f3195774f
5 changed files with 116 additions and 2 deletions
41
src/node/security/OIDCAdapter.ts
Normal file
41
src/node/security/OIDCAdapter.ts
Normal file
|
@ -0,0 +1,41 @@
|
|||
import {Account, Adapter, AdapterPayload} from "oidc-provider";
|
||||
|
||||
export class OIDCAdapter implements Adapter {
|
||||
private store: Map<string, Account> = new Map();
|
||||
private logins: Map<string, Account> = new Map();
|
||||
consume(id: string): Promise<void | undefined> {
|
||||
console.log('consume', id)
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
destroy(id: string): Promise<void | undefined> {
|
||||
console.log('destroy', id)
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
find(id: string): Promise<AdapterPayload | void | undefined> {
|
||||
console.log('find', id)
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
findByUid(uid: string): Promise<AdapterPayload | void | undefined> {
|
||||
console.log('findByUid', uid)
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
findByUserCode(userCode: string): Promise<AdapterPayload | void | undefined> {
|
||||
console.log('findByUserCode', userCode)
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
revokeByGrantId(grantId: string): Promise<void | undefined> {
|
||||
console.log('revokeByGrantId', grantId)
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
upsert(id: string, payload: AdapterPayload, expiresIn: number): Promise<void | undefined> {
|
||||
console.log('upsert', id, payload, expiresIn)
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue