fix: store well-known logins in new auth service
This commit is contained in:
parent
1f053c4942
commit
5b1085d229
3 changed files with 41 additions and 14 deletions
|
|
@ -51,6 +51,7 @@ export interface Interface {
|
|||
readonly get: (url: string) => Effect.Effect<Entry | undefined, Error>
|
||||
readonly set: (url: string, entry: Entry) => Effect.Effect<void, Error>
|
||||
readonly remove: (url: string) => Effect.Effect<void, Error>
|
||||
readonly metadata: (url: string) => Effect.Effect<Metadata, Error>
|
||||
readonly configs: () => Effect.Effect<ConfigDocument[], Error>
|
||||
}
|
||||
|
||||
|
|
@ -177,6 +178,10 @@ export const layer = Layer.effect(
|
|||
)
|
||||
}),
|
||||
|
||||
metadata: Effect.fn("AuthWellKnown.metadata.public")(function* (url) {
|
||||
return (yield* metadata(url)).metadata
|
||||
}),
|
||||
|
||||
configs: Effect.fn("AuthWellKnown.configs")(function* () {
|
||||
const documents = yield* Effect.all(
|
||||
Object.entries(yield* SynchronizedRef.get(state)).map(([url, entry]) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue