mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-06 04:08:47 +00:00
21 lines
417 B
JavaScript
21 lines
417 B
JavaScript
const NullIdentity = { user: null, groups: [] };
|
|
|
|
function createNullIdentity() {
|
|
return {
|
|
getIdentity: () => NullIdentity,
|
|
getContext: () => ({
|
|
provider: "null",
|
|
}),
|
|
};
|
|
}
|
|
|
|
async function fetchNullIdentity([key]) {
|
|
return fetch(key).then((res) => res.json());
|
|
}
|
|
|
|
const NullIdentityProvider = {
|
|
create: createNullIdentity,
|
|
fetch: fetchNullIdentity,
|
|
};
|
|
|
|
export default NullIdentityProvider;
|