start authorization module
This commit is contained in:
parent
d5be05585d
commit
c832d69c2e
|
@ -14,6 +14,7 @@ COPY --chown=node:node package*.json ./
|
|||
|
||||
# Install app dependencies using the `npm ci` command instead of `npm install`
|
||||
RUN npm ci
|
||||
RUN npx prisma generate
|
||||
|
||||
# Bundle app source
|
||||
COPY --chown=node:node . .
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "auth",
|
||||
"name": "mobicoop-v3-auth",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "auth",
|
||||
"name": "mobicoop-v3-auth",
|
||||
"version": "0.0.1",
|
||||
"license": "UNLICENSED",
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@automapper/classes": "^8.7.7",
|
||||
"@automapper/core": "^8.7.7",
|
||||
|
|
|
@ -12,7 +12,7 @@ async function bootstrap() {
|
|||
package: 'authentication',
|
||||
protoPath: join(
|
||||
__dirname,
|
||||
'modules/auth/adapters/primaries/authentication.proto',
|
||||
'modules/authentication/adapters/primaries/authentication.proto',
|
||||
),
|
||||
url: process.env.SERVICE_URL + ':' + process.env.SERVICE_PORT,
|
||||
loader: { keepCase: true, enums: String },
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
export class Authorization {
|
||||
uuid: string;
|
||||
action: string;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
import { QueryHandler } from '@nestjs/cqrs';
|
||||
import { ValidateAuthorizationQuery } from '../../queries/validate-authorization.query';
|
||||
|
||||
@QueryHandler(ValidateAuthorizationQuery)
|
||||
export class ValidateAuthenticationUseCase {
|
||||
async execute(validate: ValidateAuthorizationQuery): Promise<boolean> {
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
export class ValidateAuthorizationQuery {
|
||||
readonly uuid: string;
|
||||
readonly action: string;
|
||||
|
||||
constructor(uuid: string, action: string) {
|
||||
this.uuid = uuid;
|
||||
this.action = action;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue