fix: allow using cookie and header in case of validating jwt

This commit is contained in:
Lakhan Samani
2022-01-24 09:56:12 +05:30
parent 87b1cac979
commit 4bc9059b0f
5 changed files with 21 additions and 9 deletions

View File

@@ -1227,7 +1227,7 @@ input SessionQueryInput {
}
input IsValidJWTQueryInput {
jwt: String!
jwt: String
roles: [String!]
}
@@ -6052,7 +6052,7 @@ func (ec *executionContext) unmarshalInputIsValidJWTQueryInput(ctx context.Conte
var err error
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("jwt"))
it.Jwt, err = ec.unmarshalNString2string(ctx, v)
it.Jwt, err = ec.unmarshalOString2string(ctx, v)
if err != nil {
return it, err
}

View File

@@ -64,7 +64,7 @@ type ForgotPasswordInput struct {
}
type IsValidJWTQueryInput struct {
Jwt string `json:"jwt"`
Jwt *string `json:"jwt"`
Roles []string `json:"roles"`
}

View File

@@ -225,7 +225,7 @@ input SessionQueryInput {
}
input IsValidJWTQueryInput {
jwt: String!
jwt: String
roles: [String!]
}