mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
add model validation for authentication handshake
This commit is contained in:
parent
7faec3f691
commit
f965e6c450
@ -1,10 +1,13 @@
|
||||
import { IsString } from 'class-validator'
|
||||
import { ArgsType, Field } from 'type-graphql'
|
||||
|
||||
@ArgsType()
|
||||
export class OpenConnectionArgs {
|
||||
@Field(() => String)
|
||||
@IsString()
|
||||
publicKey: string
|
||||
|
||||
@Field(() => String)
|
||||
@IsString()
|
||||
url: string
|
||||
}
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
import { IsString, IsUUID } from 'class-validator'
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class AuthenticationArgs {
|
||||
@Field(() => String)
|
||||
@IsString()
|
||||
oneTimeCode: string
|
||||
|
||||
@Field(() => String)
|
||||
@IsUUID('4')
|
||||
uuid: string
|
||||
}
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
import { IsString } from 'class-validator'
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class OpenConnectionArgs {
|
||||
@Field(() => String)
|
||||
@IsString()
|
||||
publicKey: string
|
||||
|
||||
@Field(() => String)
|
||||
@IsString()
|
||||
url: string
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ const schema = async (): Promise<GraphQLSchema> => {
|
||||
resolvers: [getApiResolvers()],
|
||||
// authChecker: isAuthorized,
|
||||
scalarsMap: [{ type: Decimal, scalar: DecimalScalar }],
|
||||
/*
|
||||
validate: {
|
||||
validationError: { target: false },
|
||||
skipMissingProperties: true,
|
||||
@ -20,7 +19,6 @@ const schema = async (): Promise<GraphQLSchema> => {
|
||||
forbidUnknownValues: true,
|
||||
stopAtFirstError: true,
|
||||
},
|
||||
*/
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user