mirror of
https://gitlab.com/mobicoop/v3/service/auth.git
synced 2026-01-12 05:52:39 +00:00
plug opa in auth
This commit is contained in:
21
src/modules/authorization/queries/decision.query.ts
Normal file
21
src/modules/authorization/queries/decision.query.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Action } from '../domain/dtos/action.enum';
|
||||
import { Domain } from '../domain/dtos/domain.enum';
|
||||
|
||||
export class DecisionQuery {
|
||||
readonly uuid: string;
|
||||
readonly domain: Domain;
|
||||
readonly action: Action;
|
||||
readonly context: Array<{ name: string; value: string }>;
|
||||
|
||||
constructor(
|
||||
uuid: string,
|
||||
domain: Domain,
|
||||
action: Action,
|
||||
context?: Array<{ name: string; value: string }>,
|
||||
) {
|
||||
this.uuid = uuid;
|
||||
this.domain = domain;
|
||||
this.action = action;
|
||||
this.context = context;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
export class ValidateAuthorizationQuery {
|
||||
readonly uuid: string;
|
||||
readonly action: string;
|
||||
|
||||
constructor(uuid: string, action: string) {
|
||||
this.uuid = uuid;
|
||||
this.action = action;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user