deno.land / x / alosaur@v1.1.1 / examples / auth / services / auth.service.ts
1234567891011121314151617import { Injectable } from "../../../src/di/mod.ts";
export interface UserModel { id: string; login: string;}
@Injectable()export class AuthService { validate(login: string, password: string): UserModel | undefined { if (login === "admin" && password === "admin") { return { id: "1", login: "admin" }; } return undefined; }}
Version Info