{"version":3,"file":"Credentials.mjs","sourceRoot":"","sources":["../../tsSourcesProject/options/Credentials.mts"],"names":[],"mappings":"AAAA,MAAM,KAAW,WAAW,CAgE3B;AAhED,WAAiB,WAAW;IAC1B,IAAY,kBAEX;IAFD,WAAY,kBAAkB;QAC5B,uCAAiB,CAAA;IACnB,CAAC,EAFW,kBAAkB,GAAlB,8BAAkB,KAAlB,8BAAkB,QAE7B;IAED,MAAa,gBAAgB;QAC3B;QACI;;;;;;WAMG;QACM,QAAgB;QACzB;;WAEG;QACM,QAAgB;YAJhB,aAAQ,GAAR,QAAQ,CAAQ;YAIhB,aAAQ,GAAR,QAAQ,CAAQ;QAC1B,CAAC;KACL;IAfY,4BAAgB,mBAe5B,CAAA;IAED,MAAa,iBAAiB;QAC5B;QACI;;;;;;WAMG;QACM,QAAgB;QACzB;;WAEG;QACM,KAAa;YAJb,aAAQ,GAAR,QAAQ,CAAQ;YAIhB,UAAK,GAAL,KAAK,CAAQ;QACvB,CAAC;KACL;IAfY,6BAAiB,oBAe7B,CAAA;IAED,MAAa,cAAc;QACzB;QACI;;WAEG;QACM,KAAa;QACtB;;WAEG;QACM,QAA4B;YAJ5B,UAAK,GAAL,KAAK,CAAQ;YAIb,aAAQ,GAAR,QAAQ,CAAoB;QACtC,CAAC;KACL;IAXY,0BAAc,iBAW1B,CAAA;IAED,MAAa,cAAc;QACzB;QACI;;WAEG;QACM,OAAe;QACxB;;WAEG;QACM,MAAe;YAJf,YAAO,GAAP,OAAO,CAAQ;YAIf,WAAM,GAAN,MAAM,CAAS;QACzB,CAAC;KACL;IAXY,0BAAc,iBAW1B,CAAA;AACH,CAAC,EAhEgB,WAAW,KAAX,WAAW,QAgE3B","sourcesContent":["export namespace Credentials {\n  export enum ThirdPartyProvider {\n    GOOGLE = \"GOOGLE\"\n  }\n\n  export class UsernamePassword {\n    constructor(\n        /**\n         * A public identifier of the user logging in. This could be:\n         * - {@link User.id}\n         * - {@link Group.id}:{@link User.id}\n         * - {@link User.login}\n         * - {@link User.email}\n         */\n        readonly username: string,\n        /**\n         * The password of the user\n         */\n        readonly password: string,\n    ) {}\n  }\n\n  export class UsernameLongToken {\n    constructor(\n        /**\n         * A public identifier of the user logging in. This could be:\n         * - {@link User.id}\n         * - {@link Group.id}:{@link User.id}\n         * - {@link User.login}\n         * - {@link User.email}\n         */\n        readonly username: string,\n        /**\n         * A long-lived token of the user\n         */\n        readonly token: string,\n    ) {}\n  }\n\n  export class ThirdPartyAuth {\n    constructor(\n        /**\n         * A token used to perform the third party authentication\n         */\n        readonly token: string,\n        /**\n         * The authentication provider\n         */\n        readonly provider: ThirdPartyProvider,\n    ) {}\n  }\n\n  export class JwtCredentials {\n    constructor(\n        /**\n         * A refresh token of the user\n         */\n        readonly refresh: string,\n        /**\n         * An initial bearer token of the user, optional.\n         */\n        readonly bearer?: string\n    ) {}\n  }\n}\n\nexport type Credentials =\n    Credentials.UsernamePassword |\n    Credentials.UsernameLongToken |\n    Credentials.ThirdPartyAuth |\n    Credentials.JwtCredentials"]}