integreat
Version:
Node.js integration layer
27 lines • 747 B
JavaScript
import { IdentType } from '../types.js';
const identAuth = {
id: 'ident',
async authenticate(_options) {
return { status: 'granted' };
},
isAuthenticated(_authentication) {
return true;
},
async validate(_authentication, options) {
const { identId } = options || {};
const ident = typeof identId === 'string'
? { id: identId }
: { id: 'anonymous', type: IdentType.Anon };
return { status: 'ok', access: { ident } };
},
authentication: {
asObject(_authentication) {
return {};
},
asHttpHeaders(_authentication) {
return {};
},
},
};
export default identAuth;
//# sourceMappingURL=ident.js.map