fix: error messages in OpenAPI/Swagger / improve error messages from failed webhooks and client timeouts (#3218)

This commit is contained in:
Arne Luenser 2023-04-14 15:06:35 +02:00 committed by GitHub
parent c15de85a60
commit b1bdcd3282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 489 additions and 3391 deletions

View File

@ -1,94 +0,0 @@
- op: replace
path: /paths/~1health~1alive
value:
get:
description: |-
This endpoint returns a HTTP 200 status code when {{.ProjectHumanName}} is accepting incoming
HTTP requests. This status does currently not include checks whether the database connection is working.
If the service supports TLS Edge Termination, this endpoint does not require the
`X-Forwarded-Proto` header to be set.
Be aware that if you are running multiple nodes of this service, the health status will never
refer to the cluster state, only to a single instance.
operationId: isAlive
responses:
'200':
content:
'application/json':
schema:
"$ref": "#/components/schemas/healthStatus"
description: {{.ProjectHumanName}} is ready to accept connections.
'500':
content:
'application/json':
schema:
"$ref": "#/components/schemas/genericError"
description: genericError
summary: Check HTTP Server Status
tags: {{ .HealthPathTags | toJson }}
- op: replace
path: /paths/~1health~1ready
value:
get:
operationId: isReady
description: |-
This endpoint returns a HTTP 200 status code when {{.ProjectHumanName}} is up running and the environment dependencies (e.g.
the database) are responsive as well.
If the service supports TLS Edge Termination, this endpoint does not require the
`X-Forwarded-Proto` header to be set.
Be aware that if you are running multiple nodes of {{.ProjectHumanName}}, the health status will never
refer to the cluster state, only to a single instance.
responses:
'200':
content:
'application/json':
schema:
type: object
properties:
status:
description: Always "ok".
type: string
description: {{.ProjectHumanName}} is ready to accept requests.
'503':
content:
'application/json':
schema:
properties:
errors:
additionalProperties:
type: string
description: Errors contains a list of errors that caused the not ready status.
type: object
type: object
description: Ory Kratos is not yet ready to accept requests.
summary: Check HTTP Server and Database Status
tags: {{ .HealthPathTags | toJson }}
- op: replace
path: /paths/~1version
value:
get:
description: |-
This endpoint returns the version of {{.ProjectHumanName}}.
If the service supports TLS Edge Termination, this endpoint does not require the
`X-Forwarded-Proto` header to be set.
Be aware that if you are running multiple nodes of this service, the version will never
refer to the cluster state, only to a single instance.
operationId: getVersion
responses:
'200':
content:
'application/json':
schema:
type: object
properties:
version:
description: The version of {{.ProjectHumanName}}.
type: string
description: Returns the {{.ProjectHumanName}} version.
summary: Return Running Software Version.
tags: {{ .HealthPathTags | toJson }}

View File

@ -11,6 +11,7 @@ import (
"github.com/pkg/errors"
"github.com/ory/herodot"
"github.com/ory/x/pointerx"
"github.com/ory/x/sqlxx"
"github.com/ory/kratos/x"
@ -61,7 +62,7 @@ func (c *Container) Valid(identity uuid.UUID) error {
return errors.WithStack(herodot.ErrBadRequest.WithReasonf("You must restart the flow because the resumable session has expired."))
}
if identity != uuid.Nil && x.DerefUUID(c.IdentityID) != identity {
if identity != uuid.Nil && pointerx.Deref(c.IdentityID) != identity {
return errors.WithStack(herodot.ErrBadRequest.WithReasonf("You must restart the flow because the resumable session was initiated by another person."))
}

View File

@ -1 +1,8 @@
"{\"error\":{\"code\":404,\"status\":\"Not Found\",\"message\":\"Unable to locate the resource\"}}\n"
{
"error": {
"code": 404,
"status": "Not Found",
"message": "Unable to locate the resource"
}
}

View File

@ -1 +1,8 @@
"{\"error\":{\"code\":404,\"status\":\"Not Found\",\"message\":\"Unable to locate the resource\"}}\n"
{
"error": {
"code": 404,
"status": "Not Found",
"message": "Unable to locate the resource"
}
}

View File

@ -1 +1,8 @@
"{\"error\":{\"code\":400,\"status\":\"Bad Request\",\"debug\":\"could not parse parameter {id} as UUID, got \",\"message\":\"uuid: incorrect UUID length 10 in string \\\"not-a-uuid\\\"\"}}\n"
{
"error": {
"code": 400,
"status": "Bad Request",
"message": "uuid: incorrect UUID length 10 in string \"not-a-uuid\""
}
}

View File

@ -1 +1,8 @@
"{\"error\":{\"code\":400,\"status\":\"Bad Request\",\"debug\":\"could not parse parameter {id} as UUID, got \",\"message\":\"uuid: incorrect UUID length 10 in string \\\"not-a-uuid\\\"\"}}\n"
{
"error": {
"code": 400,
"status": "Bad Request",
"message": "uuid: incorrect UUID length 10 in string \"not-a-uuid\""
}
}

View File

@ -65,7 +65,7 @@ func TestHandler(t *testing.T) {
require.NoError(t, err)
require.NoError(t, res.Body.Close())
assert.EqualValues(t, expectCode, res.StatusCode, "%s", body)
assert.EqualValuesf(t, expectCode, res.StatusCode, "%s", body)
return gjson.ParseBytes(body)
}
@ -80,7 +80,7 @@ func TestHandler(t *testing.T) {
}
parsed := get(t, ts, href, http.StatusOK)
require.True(t, parsed.IsArray(), "%s", parsed.Raw)
require.Truef(t, parsed.IsArray(), "%s", parsed.Raw)
return parsed
}
@ -188,7 +188,7 @@ func TestHandler(t *testing.T) {
for _, tc := range tss {
t.Run("endpoint="+tc.name, func(t *testing.T) {
parsed := getList(t, tc.name, "")
require.Len(t, parsed.Array(), msgCount, "%s", parsed.Raw)
require.Lenf(t, parsed.Array(), msgCount, "%s", parsed.Raw)
for _, item := range parsed.Array() {
assert.Equal(t, "<redacted-unless-dev-mode>", item.Get("body").String())
@ -201,7 +201,7 @@ func TestHandler(t *testing.T) {
for _, tc := range tss {
t.Run("endpoint="+tc.name, func(t *testing.T) {
parsed := getList(t, tc.name, "")
require.Len(t, parsed.Array(), msgCount, "%s", parsed.Raw)
require.Lenf(t, parsed.Array(), msgCount, "%s", parsed.Raw)
for _, item := range parsed.Array() {
assert.Equal(t, "body content", item.Get("body").String())
@ -266,7 +266,7 @@ func TestHandler(t *testing.T) {
t.Run("endpoint="+tc.name, func(t *testing.T) {
body := getCourierMessag(tc.s, "not-a-uuid")
snapshotx.SnapshotT(t, body.String())
snapshotx.SnapshotTJSONString(t, body.String())
})
}
})
@ -274,8 +274,7 @@ func TestHandler(t *testing.T) {
for _, tc := range tss {
t.Run("endpoint="+tc.name, func(t *testing.T) {
body := getCourierMessag(tc.s, uuid.Nil.String())
snapshotx.SnapshotT(t, body.String())
snapshotx.SnapshotTJSONString(t, body.String())
})
}
})

28
go.mod
View File

@ -70,12 +70,12 @@ require (
github.com/ory/dockertest/v3 v3.9.1
github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe
github.com/ory/graceful v0.1.4-0.20230301144740-e222150c51d0
github.com/ory/herodot v0.9.13
github.com/ory/herodot v0.10.2
github.com/ory/hydra-client-go/v2 v2.0.3
github.com/ory/jsonschema/v3 v3.0.8
github.com/ory/mail/v3 v3.0.0
github.com/ory/nosurf v1.2.7
github.com/ory/x v0.0.549
github.com/ory/x v0.0.551
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pkg/errors v0.9.1
github.com/pquerna/otp v1.4.0
@ -83,7 +83,7 @@ require (
github.com/samber/lo v1.37.0
github.com/sirupsen/logrus v1.9.0
github.com/slack-go/slack v0.7.4
github.com/spf13/cobra v1.6.1
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/sqs/goreturns v0.0.0-20181028201513-538ac6014518
github.com/stretchr/testify v1.8.2
@ -96,13 +96,14 @@ require (
go.opentelemetry.io/otel/trace v1.11.1
golang.org/x/crypto v0.5.0
golang.org/x/net v0.8.0
golang.org/x/oauth2 v0.4.0
golang.org/x/oauth2 v0.6.0
golang.org/x/sync v0.1.0
golang.org/x/tools/cmd/cover v0.1.0-deprecated
google.golang.org/grpc v1.54.0
)
require (
cloud.google.com/go/compute v1.14.0 // indirect
cloud.google.com/go/compute v1.19.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
@ -122,11 +123,11 @@ require (
github.com/bmatcuk/doublestar v1.3.4 // indirect
github.com/boombuler/barcode v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cloudflare/cfssl v1.6.1 // indirect
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 // indirect
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect
github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b // indirect
github.com/cockroachdb/cockroach-go/v2 v2.2.16 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
@ -141,8 +142,8 @@ require (
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/elliotchance/orderedmap v1.4.0 // indirect
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect
github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect
github.com/envoyproxy/go-control-plane v0.10.3 // indirect
github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/felixge/fgprof v0.9.3 // indirect
@ -311,16 +312,15 @@ require (
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.21.0 // indirect
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.1.0 // indirect
golang.org/x/tools v0.7.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect
google.golang.org/grpc v1.52.0 // indirect
google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect

80
go.sum
View File

@ -30,8 +30,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/compute v1.14.0 h1:hfm2+FfxVmnRlh6LpB7cg1ZNU+5edAHmW679JePztk0=
cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo=
cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ=
cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
@ -195,8 +195,9 @@ github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+M
github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk=
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d h1:S2NE3iHSwP0XV47EEXL8mWmRdEfGscSJ+7EgePNgt0s=
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
@ -222,15 +223,16 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210322005330-6414d713912e/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk=
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 h1:KwaoQzs/WeUxxJqiJsZ4euOly1Az/IgZXXSxlD/UBNk=
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b h1:ACGZRIr7HsgBKHsueQ1yM4WaVaXh21ynwqsF8M8tXhA=
github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/cockroachdb/cockroach-go/v2 v2.2.16 h1:t9dmZuC9J2W8IDQDSIGXmP+fBuEJSsrGXxWQz4cYqBY=
@ -288,8 +290,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davidrjonas/semver-cli v0.0.0-20190116233701-ee19a9a0dda6 h1:VzPvKOw28XJ77PYwOq5gAqvFB4gk6gst0HxxiW8kfZQ=
github.com/davidrjonas/semver-cli v0.0.0-20190116233701-ee19a9a0dda6/go.mod h1:+6FzxsSbK4oEuvdN06Jco8zKB2mQqIB6UduZdd0Zesk=
github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY=
github.com/dgraph-io/ristretto v0.0.1/go.mod h1:T40EBc7CJke8TkpiYfGGKAeFjSaxuFXhuXRyumBd6RE=
github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8=
github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
@ -329,13 +329,14 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0=
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/go-control-plane v0.10.3 h1:xdCVXxEe0Y3FQith+0cj2irwZudqGYvecuLB1HtdexY=
github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v0.3.0-java/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v0.6.1/go.mod h1:txg5va2Qkip90uYoSKH+nkAAmXrb2j3iq4FLwdrCbXQ=
github.com/envoyproxy/protoc-gen-validate v0.6.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE=
github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws=
github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo=
github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY=
github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w=
github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca/go.mod h1:49H/RkXP8pKaZy4h0d+NW16rSLhyVBt4o6VLJbmOqDE=
github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
@ -930,7 +931,7 @@ github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0U
github.com/luna-duclos/instrumentedsql v1.1.3 h1:t7mvC0z1jUt5A0UQ6I/0H31ryymuQRnJcWCiqV3lSAA=
github.com/luna-duclos/instrumentedsql v1.1.3/go.mod h1:9J1njvFds+zN7y85EDhN9XNQLANWwZt2ULeIC8yMNYs=
github.com/lyft/protoc-gen-star v0.5.1/go.mod h1:9toiA3cC7z5uVbODF7kEQ91Xn7XNFkVUl+SrEe+ZORU=
github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=
github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA=
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
@ -1008,7 +1009,6 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
@ -1090,13 +1090,12 @@ github.com/ory/analytics-go/v4 v4.0.3 h1:2zNBQLlm3UiD8U7DdUGLLUBm62ZA5GtbEJ3S5U+
github.com/ory/analytics-go/v4 v4.0.3/go.mod h1:A3Chm/3TmM8jw4nqRss+gFhAYHRI5j/HFYH3C1FRahU=
github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY=
github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM=
github.com/ory/go-acc v0.2.6/go.mod h1:4Kb/UnPcT8qRAk3IAxta+hvVapdxTLWtrr7bFLlEgpw=
github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe h1:rvu4obdvqR0fkSIJ8IfgzKOWwZ5kOT2UNfLq81Qk7rc=
github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe/go.mod h1:z4n3u6as84LbV4YmgjHhnwtccQqzf4cZlSk9f1FhygI=
github.com/ory/graceful v0.1.4-0.20230301144740-e222150c51d0 h1:VMUeLRfQD14fOMvhpYZIIT4vtAqxYh+f3KnSqCeJ13o=
github.com/ory/graceful v0.1.4-0.20230301144740-e222150c51d0/go.mod h1:hg2iCy+LCWOXahBZ+NQa4dk8J2govyQD79rrqrgMyY8=
github.com/ory/herodot v0.9.13 h1:cN/Z4eOkErl/9W7hDIDLb79IO/bfsH+8yscBjRpB4IU=
github.com/ory/herodot v0.9.13/go.mod h1:IWDs9kSvFQqw/cQ8zi5ksyYvITiUU4dI7glUrhZcJYo=
github.com/ory/herodot v0.10.2 h1:gGvNMHgAwWzdP/eo+roSiT5CGssygHSjDU7MSQNlJ4E=
github.com/ory/herodot v0.10.2/go.mod h1:MMNmY6MG1uB6fnXYFaHoqdV23DTWctlPsmRCeq/2+wc=
github.com/ory/hydra-client-go/v2 v2.0.3 h1:jIx968J9RBnjRuaQ21QMLCwZoa28FPvzYWAQ+88XVLw=
github.com/ory/hydra-client-go/v2 v2.0.3/go.mod h1:FRuayIF1H/HD2umlad8c3h7RuHpcmsjBDpW0/R2OQ/U=
github.com/ory/jsonschema/v3 v3.0.8 h1:Ssdb3eJ4lDZ/+XnGkvQS/te0p+EkolqwTsDOCxr/FmU=
@ -1108,9 +1107,8 @@ github.com/ory/nosurf v1.2.7 h1:YrHrbSensQyU6r6HT/V5+HPdVEgrOTMJiLoJABSBOp4=
github.com/ory/nosurf v1.2.7/go.mod h1:d4L3ZBa7Amv55bqxCBtCs63wSlyaiCkWVl4vKf3OUxA=
github.com/ory/sessions v1.2.2-0.20220110165800-b09c17334dc2 h1:zm6sDvHy/U9XrGpixwHiuAwpp0Ock6khSVHkrv6lQQU=
github.com/ory/sessions v1.2.2-0.20220110165800-b09c17334dc2/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/ory/viper v1.7.5/go.mod h1:ypOuyJmEUb3oENywQZRgeAMwqgOyDqwboO1tj3DjTaM=
github.com/ory/x v0.0.549 h1:/ngQEYmHMEQAsYxK4uasAR9/WALxRLfHiDUPFQrD6/I=
github.com/ory/x v0.0.549/go.mod h1:00UrEq/wEgXxpagcfjn5w2PsJPpfxAVnb94M+eg1bC0=
github.com/ory/x v0.0.551 h1:U3z2bvSzAwDP0SWmbAdjzfvWPu4k+oWrPctoCdalGk0=
github.com/ory/x v0.0.551/go.mod h1:oRVemI3SQQOLvOCJWIRinHQKlgmay/NbwSyRUIsS/Yk=
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
@ -1124,7 +1122,6 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs=
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us=
@ -1288,7 +1285,6 @@ github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
github.com/spf13/afero v1.3.4/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
@ -1303,8 +1299,9 @@ github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tL
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
@ -1418,7 +1415,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
@ -1502,6 +1498,7 @@ go.opentelemetry.io/otel/sdk v1.11.1/go.mod h1:/l3FE4SupHJ12TduVjUkZtlfFqDCQJlOl
go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ=
go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
go.opentelemetry.io/proto/otlp v0.18.0 h1:W5hyXNComRa23tGpKwG+FRAc4rfF6ZUg1JReK+QHS80=
go.opentelemetry.io/proto/otlp v0.18.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@ -1549,7 +1546,6 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20191117063200-497ca9f6d64f/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
@ -1607,8 +1603,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -1666,7 +1662,6 @@ golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy
golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
@ -1697,8 +1692,8 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210810183815-faf39c7919d5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M=
golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec=
golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw=
golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -1759,7 +1754,6 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -1771,7 +1765,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -1804,7 +1797,6 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@ -1823,8 +1815,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20191110171634-ad39bd3f0407/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@ -1930,7 +1922,6 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
@ -2017,7 +2008,6 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
@ -2035,10 +2025,10 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE
google.golang.org/genproto v0.0.0-20210413151531-c14fb6ef47c3/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
google.golang.org/genproto v0.0.0-20210510173355-fb37daa5cd7a/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY=
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd h1:sLpv7bNL1AsX3fdnWh9WVh7ejIzXdOc1RRHGeAmeStU=
google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak=
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
@ -2072,11 +2062,11 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk=
google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag=
google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/grpc/examples v0.0.0-20210304020650-930c79186c99 h1:qA8rMbz1wQ4DOFfM2ouD29DG9aHWBm6ZOy9BGxiUMmY=
google.golang.org/grpc/examples v0.0.0-20210304020650-930c79186c99/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@ -2091,6 +2081,7 @@ google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX7
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
@ -2114,7 +2105,6 @@ gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8
gopkg.in/go-playground/mold.v2 v2.2.0/go.mod h1:XMyyRsGtakkDPbxXbrA5VODo6bUXyvoDjLd5l3T0XoA=
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/mail.v2 v2.3.1/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw=

View File

@ -17,32 +17,17 @@ import (
// ErrorAuthenticatorAssuranceLevelNotSatisfied struct for ErrorAuthenticatorAssuranceLevelNotSatisfied
type ErrorAuthenticatorAssuranceLevelNotSatisfied struct {
// The status code
Code *int64 `json:"code,omitempty"`
// Debug information This field is often not exposed to protect against leaking sensitive information.
Debug *string `json:"debug,omitempty"`
// Further error details
Details map[string]interface{} `json:"details,omitempty"`
// The error ID Useful when trying to identify various errors in application logic.
Id *string `json:"id,omitempty"`
// Error message The error's message.
Message string `json:"message"`
// A human-readable reason for the error
Reason *string `json:"reason,omitempty"`
Error *GenericError `json:"error,omitempty"`
// Points to where to redirect the user to next.
RedirectBrowserTo *string `json:"redirect_browser_to,omitempty"`
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
Request *string `json:"request,omitempty"`
// The status description
Status *string `json:"status,omitempty"`
}
// NewErrorAuthenticatorAssuranceLevelNotSatisfied instantiates a new ErrorAuthenticatorAssuranceLevelNotSatisfied object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewErrorAuthenticatorAssuranceLevelNotSatisfied(message string) *ErrorAuthenticatorAssuranceLevelNotSatisfied {
func NewErrorAuthenticatorAssuranceLevelNotSatisfied() *ErrorAuthenticatorAssuranceLevelNotSatisfied {
this := ErrorAuthenticatorAssuranceLevelNotSatisfied{}
this.Message = message
return &this
}
@ -54,188 +39,36 @@ func NewErrorAuthenticatorAssuranceLevelNotSatisfiedWithDefaults() *ErrorAuthent
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetCode() int64 {
if o == nil || o.Code == nil {
var ret int64
// GetError returns the Error field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetError() GenericError {
if o == nil || o.Error == nil {
var ret GenericError
return ret
}
return *o.Code
return *o.Error
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetCodeOk() (*int64, bool) {
if o == nil || o.Code == nil {
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetErrorOk() (*GenericError, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Code, true
return o.Error, true
}
// HasCode returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasCode() bool {
if o != nil && o.Code != nil {
// HasError returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetCode(v int64) {
o.Code = &v
}
// GetDebug returns the Debug field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetDebug() string {
if o == nil || o.Debug == nil {
var ret string
return ret
}
return *o.Debug
}
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetDebugOk() (*string, bool) {
if o == nil || o.Debug == nil {
return nil, false
}
return o.Debug, true
}
// HasDebug returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasDebug() bool {
if o != nil && o.Debug != nil {
return true
}
return false
}
// SetDebug gets a reference to the given string and assigns it to the Debug field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetDebug(v string) {
o.Debug = &v
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetDetails() map[string]interface{} {
if o == nil || o.Details == nil {
var ret map[string]interface{}
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetDetailsOk() (map[string]interface{}, bool) {
if o == nil || o.Details == nil {
return nil, false
}
return o.Details, true
}
// HasDetails returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasDetails() bool {
if o != nil && o.Details != nil {
return true
}
return false
}
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetDetails(v map[string]interface{}) {
o.Details = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetId(v string) {
o.Id = &v
}
// GetMessage returns the Message field value
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetMessage(v string) {
o.Message = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetReason() string {
if o == nil || o.Reason == nil {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetReasonOk() (*string, bool) {
if o == nil || o.Reason == nil {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasReason() bool {
if o != nil && o.Reason != nil {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetReason(v string) {
o.Reason = &v
// SetError gets a reference to the given GenericError and assigns it to the Error field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetError(v GenericError) {
o.Error = &v
}
// GetRedirectBrowserTo returns the RedirectBrowserTo field value if set, zero value otherwise.
@ -270,99 +103,14 @@ func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetRedirectBrowserTo(v st
o.RedirectBrowserTo = &v
}
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetRequest() string {
if o == nil || o.Request == nil {
var ret string
return ret
}
return *o.Request
}
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetRequestOk() (*string, bool) {
if o == nil || o.Request == nil {
return nil, false
}
return o.Request, true
}
// HasRequest returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasRequest() bool {
if o != nil && o.Request != nil {
return true
}
return false
}
// SetRequest gets a reference to the given string and assigns it to the Request field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetRequest(v string) {
o.Request = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetStatus(v string) {
o.Status = &v
}
func (o ErrorAuthenticatorAssuranceLevelNotSatisfied) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.Debug != nil {
toSerialize["debug"] = o.Debug
}
if o.Details != nil {
toSerialize["details"] = o.Details
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["message"] = o.Message
}
if o.Reason != nil {
toSerialize["reason"] = o.Reason
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.RedirectBrowserTo != nil {
toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
}
if o.Request != nil {
toSerialize["request"] = o.Request
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
return json.Marshal(toSerialize)
}

View File

@ -17,33 +17,17 @@ import (
// ErrorBrowserLocationChangeRequired struct for ErrorBrowserLocationChangeRequired
type ErrorBrowserLocationChangeRequired struct {
// The status code
Code *int64 `json:"code,omitempty"`
// Debug information This field is often not exposed to protect against leaking sensitive information.
Debug *string `json:"debug,omitempty"`
// Further error details
Details map[string]interface{} `json:"details,omitempty"`
// The error ID Useful when trying to identify various errors in application logic.
Id *string `json:"id,omitempty"`
// Error message The error's message.
Message string `json:"message"`
// A human-readable reason for the error
Reason *string `json:"reason,omitempty"`
// Since when the flow has expired
Error *ErrorGeneric `json:"error,omitempty"`
// Points to where to redirect the user to next.
RedirectBrowserTo *string `json:"redirect_browser_to,omitempty"`
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
Request *string `json:"request,omitempty"`
// The status description
Status *string `json:"status,omitempty"`
}
// NewErrorBrowserLocationChangeRequired instantiates a new ErrorBrowserLocationChangeRequired object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewErrorBrowserLocationChangeRequired(message string) *ErrorBrowserLocationChangeRequired {
func NewErrorBrowserLocationChangeRequired() *ErrorBrowserLocationChangeRequired {
this := ErrorBrowserLocationChangeRequired{}
this.Message = message
return &this
}
@ -55,188 +39,36 @@ func NewErrorBrowserLocationChangeRequiredWithDefaults() *ErrorBrowserLocationCh
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetCode() int64 {
if o == nil || o.Code == nil {
var ret int64
// GetError returns the Error field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetError() ErrorGeneric {
if o == nil || o.Error == nil {
var ret ErrorGeneric
return ret
}
return *o.Code
return *o.Error
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetCodeOk() (*int64, bool) {
if o == nil || o.Code == nil {
func (o *ErrorBrowserLocationChangeRequired) GetErrorOk() (*ErrorGeneric, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Code, true
return o.Error, true
}
// HasCode returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasCode() bool {
if o != nil && o.Code != nil {
// HasError returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *ErrorBrowserLocationChangeRequired) SetCode(v int64) {
o.Code = &v
}
// GetDebug returns the Debug field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetDebug() string {
if o == nil || o.Debug == nil {
var ret string
return ret
}
return *o.Debug
}
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetDebugOk() (*string, bool) {
if o == nil || o.Debug == nil {
return nil, false
}
return o.Debug, true
}
// HasDebug returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasDebug() bool {
if o != nil && o.Debug != nil {
return true
}
return false
}
// SetDebug gets a reference to the given string and assigns it to the Debug field.
func (o *ErrorBrowserLocationChangeRequired) SetDebug(v string) {
o.Debug = &v
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetDetails() map[string]interface{} {
if o == nil || o.Details == nil {
var ret map[string]interface{}
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetDetailsOk() (map[string]interface{}, bool) {
if o == nil || o.Details == nil {
return nil, false
}
return o.Details, true
}
// HasDetails returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasDetails() bool {
if o != nil && o.Details != nil {
return true
}
return false
}
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
func (o *ErrorBrowserLocationChangeRequired) SetDetails(v map[string]interface{}) {
o.Details = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ErrorBrowserLocationChangeRequired) SetId(v string) {
o.Id = &v
}
// GetMessage returns the Message field value
func (o *ErrorBrowserLocationChangeRequired) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *ErrorBrowserLocationChangeRequired) SetMessage(v string) {
o.Message = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetReason() string {
if o == nil || o.Reason == nil {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetReasonOk() (*string, bool) {
if o == nil || o.Reason == nil {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasReason() bool {
if o != nil && o.Reason != nil {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *ErrorBrowserLocationChangeRequired) SetReason(v string) {
o.Reason = &v
// SetError gets a reference to the given ErrorGeneric and assigns it to the Error field.
func (o *ErrorBrowserLocationChangeRequired) SetError(v ErrorGeneric) {
o.Error = &v
}
// GetRedirectBrowserTo returns the RedirectBrowserTo field value if set, zero value otherwise.
@ -271,99 +103,14 @@ func (o *ErrorBrowserLocationChangeRequired) SetRedirectBrowserTo(v string) {
o.RedirectBrowserTo = &v
}
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetRequest() string {
if o == nil || o.Request == nil {
var ret string
return ret
}
return *o.Request
}
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetRequestOk() (*string, bool) {
if o == nil || o.Request == nil {
return nil, false
}
return o.Request, true
}
// HasRequest returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasRequest() bool {
if o != nil && o.Request != nil {
return true
}
return false
}
// SetRequest gets a reference to the given string and assigns it to the Request field.
func (o *ErrorBrowserLocationChangeRequired) SetRequest(v string) {
o.Request = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *ErrorBrowserLocationChangeRequired) SetStatus(v string) {
o.Status = &v
}
func (o ErrorBrowserLocationChangeRequired) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.Debug != nil {
toSerialize["debug"] = o.Debug
}
if o.Details != nil {
toSerialize["details"] = o.Details
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["message"] = o.Message
}
if o.Reason != nil {
toSerialize["reason"] = o.Reason
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.RedirectBrowserTo != nil {
toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
}
if o.Request != nil {
toSerialize["request"] = o.Request
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
return json.Marshal(toSerialize)
}

View File

@ -17,22 +17,7 @@ import (
// ErrorFlowReplaced Is sent when a flow is replaced by a different flow of the same class
type ErrorFlowReplaced struct {
// The status code
Code *int64 `json:"code,omitempty"`
// Debug information This field is often not exposed to protect against leaking sensitive information.
Debug *string `json:"debug,omitempty"`
// Further error details
Details map[string]interface{} `json:"details,omitempty"`
// The error ID Useful when trying to identify various errors in application logic.
Id *string `json:"id,omitempty"`
// Error message The error's message.
Message string `json:"message"`
// A human-readable reason for the error
Reason *string `json:"reason,omitempty"`
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
Request *string `json:"request,omitempty"`
// The status description
Status *string `json:"status,omitempty"`
Error *GenericError `json:"error,omitempty"`
// The flow ID that should be used for the new flow as it contains the correct messages.
UseFlowId *string `json:"use_flow_id,omitempty"`
}
@ -41,9 +26,8 @@ type ErrorFlowReplaced struct {
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewErrorFlowReplaced(message string) *ErrorFlowReplaced {
func NewErrorFlowReplaced() *ErrorFlowReplaced {
this := ErrorFlowReplaced{}
this.Message = message
return &this
}
@ -55,252 +39,36 @@ func NewErrorFlowReplacedWithDefaults() *ErrorFlowReplaced {
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetCode() int64 {
if o == nil || o.Code == nil {
var ret int64
// GetError returns the Error field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetError() GenericError {
if o == nil || o.Error == nil {
var ret GenericError
return ret
}
return *o.Code
return *o.Error
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetCodeOk() (*int64, bool) {
if o == nil || o.Code == nil {
func (o *ErrorFlowReplaced) GetErrorOk() (*GenericError, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Code, true
return o.Error, true
}
// HasCode returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasCode() bool {
if o != nil && o.Code != nil {
// HasError returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *ErrorFlowReplaced) SetCode(v int64) {
o.Code = &v
}
// GetDebug returns the Debug field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetDebug() string {
if o == nil || o.Debug == nil {
var ret string
return ret
}
return *o.Debug
}
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetDebugOk() (*string, bool) {
if o == nil || o.Debug == nil {
return nil, false
}
return o.Debug, true
}
// HasDebug returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasDebug() bool {
if o != nil && o.Debug != nil {
return true
}
return false
}
// SetDebug gets a reference to the given string and assigns it to the Debug field.
func (o *ErrorFlowReplaced) SetDebug(v string) {
o.Debug = &v
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetDetails() map[string]interface{} {
if o == nil || o.Details == nil {
var ret map[string]interface{}
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetDetailsOk() (map[string]interface{}, bool) {
if o == nil || o.Details == nil {
return nil, false
}
return o.Details, true
}
// HasDetails returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasDetails() bool {
if o != nil && o.Details != nil {
return true
}
return false
}
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
func (o *ErrorFlowReplaced) SetDetails(v map[string]interface{}) {
o.Details = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ErrorFlowReplaced) SetId(v string) {
o.Id = &v
}
// GetMessage returns the Message field value
func (o *ErrorFlowReplaced) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *ErrorFlowReplaced) SetMessage(v string) {
o.Message = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetReason() string {
if o == nil || o.Reason == nil {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetReasonOk() (*string, bool) {
if o == nil || o.Reason == nil {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasReason() bool {
if o != nil && o.Reason != nil {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *ErrorFlowReplaced) SetReason(v string) {
o.Reason = &v
}
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetRequest() string {
if o == nil || o.Request == nil {
var ret string
return ret
}
return *o.Request
}
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetRequestOk() (*string, bool) {
if o == nil || o.Request == nil {
return nil, false
}
return o.Request, true
}
// HasRequest returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasRequest() bool {
if o != nil && o.Request != nil {
return true
}
return false
}
// SetRequest gets a reference to the given string and assigns it to the Request field.
func (o *ErrorFlowReplaced) SetRequest(v string) {
o.Request = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *ErrorFlowReplaced) SetStatus(v string) {
o.Status = &v
// SetError gets a reference to the given GenericError and assigns it to the Error field.
func (o *ErrorFlowReplaced) SetError(v GenericError) {
o.Error = &v
}
// GetUseFlowId returns the UseFlowId field value if set, zero value otherwise.
@ -337,29 +105,8 @@ func (o *ErrorFlowReplaced) SetUseFlowId(v string) {
func (o ErrorFlowReplaced) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.Debug != nil {
toSerialize["debug"] = o.Debug
}
if o.Details != nil {
toSerialize["details"] = o.Details
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["message"] = o.Message
}
if o.Reason != nil {
toSerialize["reason"] = o.Reason
}
if o.Request != nil {
toSerialize["request"] = o.Request
}
if o.Status != nil {
toSerialize["status"] = o.Status
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.UseFlowId != nil {
toSerialize["use_flow_id"] = o.UseFlowId

View File

@ -17,33 +17,17 @@ import (
// NeedsPrivilegedSessionError struct for NeedsPrivilegedSessionError
type NeedsPrivilegedSessionError struct {
// The status code
Code *int64 `json:"code,omitempty"`
// Debug information This field is often not exposed to protect against leaking sensitive information.
Debug *string `json:"debug,omitempty"`
// Further error details
Details map[string]interface{} `json:"details,omitempty"`
// The error ID Useful when trying to identify various errors in application logic.
Id *string `json:"id,omitempty"`
// Error message The error's message.
Message string `json:"message"`
// A human-readable reason for the error
Reason *string `json:"reason,omitempty"`
Error *GenericError `json:"error,omitempty"`
// Points to where to redirect the user to next.
RedirectBrowserTo string `json:"redirect_browser_to"`
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
Request *string `json:"request,omitempty"`
// The status description
Status *string `json:"status,omitempty"`
}
// NewNeedsPrivilegedSessionError instantiates a new NeedsPrivilegedSessionError object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewNeedsPrivilegedSessionError(message string, redirectBrowserTo string) *NeedsPrivilegedSessionError {
func NewNeedsPrivilegedSessionError(redirectBrowserTo string) *NeedsPrivilegedSessionError {
this := NeedsPrivilegedSessionError{}
this.Message = message
this.RedirectBrowserTo = redirectBrowserTo
return &this
}
@ -56,188 +40,36 @@ func NewNeedsPrivilegedSessionErrorWithDefaults() *NeedsPrivilegedSessionError {
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetCode() int64 {
if o == nil || o.Code == nil {
var ret int64
// GetError returns the Error field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetError() GenericError {
if o == nil || o.Error == nil {
var ret GenericError
return ret
}
return *o.Code
return *o.Error
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetCodeOk() (*int64, bool) {
if o == nil || o.Code == nil {
func (o *NeedsPrivilegedSessionError) GetErrorOk() (*GenericError, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Code, true
return o.Error, true
}
// HasCode returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasCode() bool {
if o != nil && o.Code != nil {
// HasError returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *NeedsPrivilegedSessionError) SetCode(v int64) {
o.Code = &v
}
// GetDebug returns the Debug field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetDebug() string {
if o == nil || o.Debug == nil {
var ret string
return ret
}
return *o.Debug
}
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetDebugOk() (*string, bool) {
if o == nil || o.Debug == nil {
return nil, false
}
return o.Debug, true
}
// HasDebug returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasDebug() bool {
if o != nil && o.Debug != nil {
return true
}
return false
}
// SetDebug gets a reference to the given string and assigns it to the Debug field.
func (o *NeedsPrivilegedSessionError) SetDebug(v string) {
o.Debug = &v
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetDetails() map[string]interface{} {
if o == nil || o.Details == nil {
var ret map[string]interface{}
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetDetailsOk() (map[string]interface{}, bool) {
if o == nil || o.Details == nil {
return nil, false
}
return o.Details, true
}
// HasDetails returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasDetails() bool {
if o != nil && o.Details != nil {
return true
}
return false
}
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
func (o *NeedsPrivilegedSessionError) SetDetails(v map[string]interface{}) {
o.Details = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *NeedsPrivilegedSessionError) SetId(v string) {
o.Id = &v
}
// GetMessage returns the Message field value
func (o *NeedsPrivilegedSessionError) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *NeedsPrivilegedSessionError) SetMessage(v string) {
o.Message = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetReason() string {
if o == nil || o.Reason == nil {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetReasonOk() (*string, bool) {
if o == nil || o.Reason == nil {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasReason() bool {
if o != nil && o.Reason != nil {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *NeedsPrivilegedSessionError) SetReason(v string) {
o.Reason = &v
// SetError gets a reference to the given GenericError and assigns it to the Error field.
func (o *NeedsPrivilegedSessionError) SetError(v GenericError) {
o.Error = &v
}
// GetRedirectBrowserTo returns the RedirectBrowserTo field value
@ -264,99 +96,14 @@ func (o *NeedsPrivilegedSessionError) SetRedirectBrowserTo(v string) {
o.RedirectBrowserTo = v
}
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetRequest() string {
if o == nil || o.Request == nil {
var ret string
return ret
}
return *o.Request
}
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetRequestOk() (*string, bool) {
if o == nil || o.Request == nil {
return nil, false
}
return o.Request, true
}
// HasRequest returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasRequest() bool {
if o != nil && o.Request != nil {
return true
}
return false
}
// SetRequest gets a reference to the given string and assigns it to the Request field.
func (o *NeedsPrivilegedSessionError) SetRequest(v string) {
o.Request = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *NeedsPrivilegedSessionError) SetStatus(v string) {
o.Status = &v
}
func (o NeedsPrivilegedSessionError) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.Debug != nil {
toSerialize["debug"] = o.Debug
}
if o.Details != nil {
toSerialize["details"] = o.Details
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["message"] = o.Message
}
if o.Reason != nil {
toSerialize["reason"] = o.Reason
if o.Error != nil {
toSerialize["error"] = o.Error
}
if true {
toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
}
if o.Request != nil {
toSerialize["request"] = o.Request
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
return json.Marshal(toSerialize)
}

View File

@ -18,26 +18,11 @@ import (
// SelfServiceFlowExpiredError Is sent when a flow is expired
type SelfServiceFlowExpiredError struct {
// The status code
Code *int64 `json:"code,omitempty"`
// Debug information This field is often not exposed to protect against leaking sensitive information.
Debug *string `json:"debug,omitempty"`
// Further error details
Details map[string]interface{} `json:"details,omitempty"`
Error *GenericError `json:"error,omitempty"`
// When the flow has expired
ExpiredAt *time.Time `json:"expired_at,omitempty"`
// The error ID Useful when trying to identify various errors in application logic.
Id *string `json:"id,omitempty"`
// Error message The error's message.
Message string `json:"message"`
// A human-readable reason for the error
Reason *string `json:"reason,omitempty"`
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
Request *string `json:"request,omitempty"`
// A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
Since *int64 `json:"since,omitempty"`
// The status description
Status *string `json:"status,omitempty"`
// The flow ID that should be used for the new flow as it contains the correct messages.
UseFlowId *string `json:"use_flow_id,omitempty"`
}
@ -46,9 +31,8 @@ type SelfServiceFlowExpiredError struct {
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewSelfServiceFlowExpiredError(message string) *SelfServiceFlowExpiredError {
func NewSelfServiceFlowExpiredError() *SelfServiceFlowExpiredError {
this := SelfServiceFlowExpiredError{}
this.Message = message
return &this
}
@ -60,100 +44,36 @@ func NewSelfServiceFlowExpiredErrorWithDefaults() *SelfServiceFlowExpiredError {
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetCode() int64 {
if o == nil || o.Code == nil {
var ret int64
// GetError returns the Error field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetError() GenericError {
if o == nil || o.Error == nil {
var ret GenericError
return ret
}
return *o.Code
return *o.Error
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetCodeOk() (*int64, bool) {
if o == nil || o.Code == nil {
func (o *SelfServiceFlowExpiredError) GetErrorOk() (*GenericError, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Code, true
return o.Error, true
}
// HasCode returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasCode() bool {
if o != nil && o.Code != nil {
// HasError returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *SelfServiceFlowExpiredError) SetCode(v int64) {
o.Code = &v
}
// GetDebug returns the Debug field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetDebug() string {
if o == nil || o.Debug == nil {
var ret string
return ret
}
return *o.Debug
}
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetDebugOk() (*string, bool) {
if o == nil || o.Debug == nil {
return nil, false
}
return o.Debug, true
}
// HasDebug returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasDebug() bool {
if o != nil && o.Debug != nil {
return true
}
return false
}
// SetDebug gets a reference to the given string and assigns it to the Debug field.
func (o *SelfServiceFlowExpiredError) SetDebug(v string) {
o.Debug = &v
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetDetails() map[string]interface{} {
if o == nil || o.Details == nil {
var ret map[string]interface{}
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetDetailsOk() (map[string]interface{}, bool) {
if o == nil || o.Details == nil {
return nil, false
}
return o.Details, true
}
// HasDetails returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasDetails() bool {
if o != nil && o.Details != nil {
return true
}
return false
}
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
func (o *SelfServiceFlowExpiredError) SetDetails(v map[string]interface{}) {
o.Details = v
// SetError gets a reference to the given GenericError and assigns it to the Error field.
func (o *SelfServiceFlowExpiredError) SetError(v GenericError) {
o.Error = &v
}
// GetExpiredAt returns the ExpiredAt field value if set, zero value otherwise.
@ -188,126 +108,6 @@ func (o *SelfServiceFlowExpiredError) SetExpiredAt(v time.Time) {
o.ExpiredAt = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *SelfServiceFlowExpiredError) SetId(v string) {
o.Id = &v
}
// GetMessage returns the Message field value
func (o *SelfServiceFlowExpiredError) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *SelfServiceFlowExpiredError) SetMessage(v string) {
o.Message = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetReason() string {
if o == nil || o.Reason == nil {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetReasonOk() (*string, bool) {
if o == nil || o.Reason == nil {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasReason() bool {
if o != nil && o.Reason != nil {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *SelfServiceFlowExpiredError) SetReason(v string) {
o.Reason = &v
}
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetRequest() string {
if o == nil || o.Request == nil {
var ret string
return ret
}
return *o.Request
}
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetRequestOk() (*string, bool) {
if o == nil || o.Request == nil {
return nil, false
}
return o.Request, true
}
// HasRequest returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasRequest() bool {
if o != nil && o.Request != nil {
return true
}
return false
}
// SetRequest gets a reference to the given string and assigns it to the Request field.
func (o *SelfServiceFlowExpiredError) SetRequest(v string) {
o.Request = &v
}
// GetSince returns the Since field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetSince() int64 {
if o == nil || o.Since == nil {
@ -340,38 +140,6 @@ func (o *SelfServiceFlowExpiredError) SetSince(v int64) {
o.Since = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *SelfServiceFlowExpiredError) SetStatus(v string) {
o.Status = &v
}
// GetUseFlowId returns the UseFlowId field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetUseFlowId() string {
if o == nil || o.UseFlowId == nil {
@ -406,36 +174,15 @@ func (o *SelfServiceFlowExpiredError) SetUseFlowId(v string) {
func (o SelfServiceFlowExpiredError) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.Debug != nil {
toSerialize["debug"] = o.Debug
}
if o.Details != nil {
toSerialize["details"] = o.Details
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.ExpiredAt != nil {
toSerialize["expired_at"] = o.ExpiredAt
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["message"] = o.Message
}
if o.Reason != nil {
toSerialize["reason"] = o.Reason
}
if o.Request != nil {
toSerialize["request"] = o.Request
}
if o.Since != nil {
toSerialize["since"] = o.Since
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
if o.UseFlowId != nil {
toSerialize["use_flow_id"] = o.UseFlowId
}

View File

@ -17,32 +17,17 @@ import (
// ErrorAuthenticatorAssuranceLevelNotSatisfied struct for ErrorAuthenticatorAssuranceLevelNotSatisfied
type ErrorAuthenticatorAssuranceLevelNotSatisfied struct {
// The status code
Code *int64 `json:"code,omitempty"`
// Debug information This field is often not exposed to protect against leaking sensitive information.
Debug *string `json:"debug,omitempty"`
// Further error details
Details map[string]interface{} `json:"details,omitempty"`
// The error ID Useful when trying to identify various errors in application logic.
Id *string `json:"id,omitempty"`
// Error message The error's message.
Message string `json:"message"`
// A human-readable reason for the error
Reason *string `json:"reason,omitempty"`
Error *GenericError `json:"error,omitempty"`
// Points to where to redirect the user to next.
RedirectBrowserTo *string `json:"redirect_browser_to,omitempty"`
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
Request *string `json:"request,omitempty"`
// The status description
Status *string `json:"status,omitempty"`
}
// NewErrorAuthenticatorAssuranceLevelNotSatisfied instantiates a new ErrorAuthenticatorAssuranceLevelNotSatisfied object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewErrorAuthenticatorAssuranceLevelNotSatisfied(message string) *ErrorAuthenticatorAssuranceLevelNotSatisfied {
func NewErrorAuthenticatorAssuranceLevelNotSatisfied() *ErrorAuthenticatorAssuranceLevelNotSatisfied {
this := ErrorAuthenticatorAssuranceLevelNotSatisfied{}
this.Message = message
return &this
}
@ -54,188 +39,36 @@ func NewErrorAuthenticatorAssuranceLevelNotSatisfiedWithDefaults() *ErrorAuthent
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetCode() int64 {
if o == nil || o.Code == nil {
var ret int64
// GetError returns the Error field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetError() GenericError {
if o == nil || o.Error == nil {
var ret GenericError
return ret
}
return *o.Code
return *o.Error
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetCodeOk() (*int64, bool) {
if o == nil || o.Code == nil {
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetErrorOk() (*GenericError, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Code, true
return o.Error, true
}
// HasCode returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasCode() bool {
if o != nil && o.Code != nil {
// HasError returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetCode(v int64) {
o.Code = &v
}
// GetDebug returns the Debug field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetDebug() string {
if o == nil || o.Debug == nil {
var ret string
return ret
}
return *o.Debug
}
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetDebugOk() (*string, bool) {
if o == nil || o.Debug == nil {
return nil, false
}
return o.Debug, true
}
// HasDebug returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasDebug() bool {
if o != nil && o.Debug != nil {
return true
}
return false
}
// SetDebug gets a reference to the given string and assigns it to the Debug field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetDebug(v string) {
o.Debug = &v
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetDetails() map[string]interface{} {
if o == nil || o.Details == nil {
var ret map[string]interface{}
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetDetailsOk() (map[string]interface{}, bool) {
if o == nil || o.Details == nil {
return nil, false
}
return o.Details, true
}
// HasDetails returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasDetails() bool {
if o != nil && o.Details != nil {
return true
}
return false
}
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetDetails(v map[string]interface{}) {
o.Details = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetId(v string) {
o.Id = &v
}
// GetMessage returns the Message field value
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetMessage(v string) {
o.Message = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetReason() string {
if o == nil || o.Reason == nil {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetReasonOk() (*string, bool) {
if o == nil || o.Reason == nil {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasReason() bool {
if o != nil && o.Reason != nil {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetReason(v string) {
o.Reason = &v
// SetError gets a reference to the given GenericError and assigns it to the Error field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetError(v GenericError) {
o.Error = &v
}
// GetRedirectBrowserTo returns the RedirectBrowserTo field value if set, zero value otherwise.
@ -270,99 +103,14 @@ func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetRedirectBrowserTo(v st
o.RedirectBrowserTo = &v
}
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetRequest() string {
if o == nil || o.Request == nil {
var ret string
return ret
}
return *o.Request
}
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetRequestOk() (*string, bool) {
if o == nil || o.Request == nil {
return nil, false
}
return o.Request, true
}
// HasRequest returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasRequest() bool {
if o != nil && o.Request != nil {
return true
}
return false
}
// SetRequest gets a reference to the given string and assigns it to the Request field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetRequest(v string) {
o.Request = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *ErrorAuthenticatorAssuranceLevelNotSatisfied) SetStatus(v string) {
o.Status = &v
}
func (o ErrorAuthenticatorAssuranceLevelNotSatisfied) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.Debug != nil {
toSerialize["debug"] = o.Debug
}
if o.Details != nil {
toSerialize["details"] = o.Details
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["message"] = o.Message
}
if o.Reason != nil {
toSerialize["reason"] = o.Reason
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.RedirectBrowserTo != nil {
toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
}
if o.Request != nil {
toSerialize["request"] = o.Request
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
return json.Marshal(toSerialize)
}

View File

@ -17,33 +17,17 @@ import (
// ErrorBrowserLocationChangeRequired struct for ErrorBrowserLocationChangeRequired
type ErrorBrowserLocationChangeRequired struct {
// The status code
Code *int64 `json:"code,omitempty"`
// Debug information This field is often not exposed to protect against leaking sensitive information.
Debug *string `json:"debug,omitempty"`
// Further error details
Details map[string]interface{} `json:"details,omitempty"`
// The error ID Useful when trying to identify various errors in application logic.
Id *string `json:"id,omitempty"`
// Error message The error's message.
Message string `json:"message"`
// A human-readable reason for the error
Reason *string `json:"reason,omitempty"`
// Since when the flow has expired
Error *ErrorGeneric `json:"error,omitempty"`
// Points to where to redirect the user to next.
RedirectBrowserTo *string `json:"redirect_browser_to,omitempty"`
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
Request *string `json:"request,omitempty"`
// The status description
Status *string `json:"status,omitempty"`
}
// NewErrorBrowserLocationChangeRequired instantiates a new ErrorBrowserLocationChangeRequired object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewErrorBrowserLocationChangeRequired(message string) *ErrorBrowserLocationChangeRequired {
func NewErrorBrowserLocationChangeRequired() *ErrorBrowserLocationChangeRequired {
this := ErrorBrowserLocationChangeRequired{}
this.Message = message
return &this
}
@ -55,188 +39,36 @@ func NewErrorBrowserLocationChangeRequiredWithDefaults() *ErrorBrowserLocationCh
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetCode() int64 {
if o == nil || o.Code == nil {
var ret int64
// GetError returns the Error field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetError() ErrorGeneric {
if o == nil || o.Error == nil {
var ret ErrorGeneric
return ret
}
return *o.Code
return *o.Error
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetCodeOk() (*int64, bool) {
if o == nil || o.Code == nil {
func (o *ErrorBrowserLocationChangeRequired) GetErrorOk() (*ErrorGeneric, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Code, true
return o.Error, true
}
// HasCode returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasCode() bool {
if o != nil && o.Code != nil {
// HasError returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *ErrorBrowserLocationChangeRequired) SetCode(v int64) {
o.Code = &v
}
// GetDebug returns the Debug field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetDebug() string {
if o == nil || o.Debug == nil {
var ret string
return ret
}
return *o.Debug
}
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetDebugOk() (*string, bool) {
if o == nil || o.Debug == nil {
return nil, false
}
return o.Debug, true
}
// HasDebug returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasDebug() bool {
if o != nil && o.Debug != nil {
return true
}
return false
}
// SetDebug gets a reference to the given string and assigns it to the Debug field.
func (o *ErrorBrowserLocationChangeRequired) SetDebug(v string) {
o.Debug = &v
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetDetails() map[string]interface{} {
if o == nil || o.Details == nil {
var ret map[string]interface{}
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetDetailsOk() (map[string]interface{}, bool) {
if o == nil || o.Details == nil {
return nil, false
}
return o.Details, true
}
// HasDetails returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasDetails() bool {
if o != nil && o.Details != nil {
return true
}
return false
}
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
func (o *ErrorBrowserLocationChangeRequired) SetDetails(v map[string]interface{}) {
o.Details = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ErrorBrowserLocationChangeRequired) SetId(v string) {
o.Id = &v
}
// GetMessage returns the Message field value
func (o *ErrorBrowserLocationChangeRequired) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *ErrorBrowserLocationChangeRequired) SetMessage(v string) {
o.Message = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetReason() string {
if o == nil || o.Reason == nil {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetReasonOk() (*string, bool) {
if o == nil || o.Reason == nil {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasReason() bool {
if o != nil && o.Reason != nil {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *ErrorBrowserLocationChangeRequired) SetReason(v string) {
o.Reason = &v
// SetError gets a reference to the given ErrorGeneric and assigns it to the Error field.
func (o *ErrorBrowserLocationChangeRequired) SetError(v ErrorGeneric) {
o.Error = &v
}
// GetRedirectBrowserTo returns the RedirectBrowserTo field value if set, zero value otherwise.
@ -271,99 +103,14 @@ func (o *ErrorBrowserLocationChangeRequired) SetRedirectBrowserTo(v string) {
o.RedirectBrowserTo = &v
}
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetRequest() string {
if o == nil || o.Request == nil {
var ret string
return ret
}
return *o.Request
}
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetRequestOk() (*string, bool) {
if o == nil || o.Request == nil {
return nil, false
}
return o.Request, true
}
// HasRequest returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasRequest() bool {
if o != nil && o.Request != nil {
return true
}
return false
}
// SetRequest gets a reference to the given string and assigns it to the Request field.
func (o *ErrorBrowserLocationChangeRequired) SetRequest(v string) {
o.Request = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ErrorBrowserLocationChangeRequired) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorBrowserLocationChangeRequired) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *ErrorBrowserLocationChangeRequired) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *ErrorBrowserLocationChangeRequired) SetStatus(v string) {
o.Status = &v
}
func (o ErrorBrowserLocationChangeRequired) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.Debug != nil {
toSerialize["debug"] = o.Debug
}
if o.Details != nil {
toSerialize["details"] = o.Details
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["message"] = o.Message
}
if o.Reason != nil {
toSerialize["reason"] = o.Reason
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.RedirectBrowserTo != nil {
toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
}
if o.Request != nil {
toSerialize["request"] = o.Request
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
return json.Marshal(toSerialize)
}

View File

@ -17,22 +17,7 @@ import (
// ErrorFlowReplaced Is sent when a flow is replaced by a different flow of the same class
type ErrorFlowReplaced struct {
// The status code
Code *int64 `json:"code,omitempty"`
// Debug information This field is often not exposed to protect against leaking sensitive information.
Debug *string `json:"debug,omitempty"`
// Further error details
Details map[string]interface{} `json:"details,omitempty"`
// The error ID Useful when trying to identify various errors in application logic.
Id *string `json:"id,omitempty"`
// Error message The error's message.
Message string `json:"message"`
// A human-readable reason for the error
Reason *string `json:"reason,omitempty"`
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
Request *string `json:"request,omitempty"`
// The status description
Status *string `json:"status,omitempty"`
Error *GenericError `json:"error,omitempty"`
// The flow ID that should be used for the new flow as it contains the correct messages.
UseFlowId *string `json:"use_flow_id,omitempty"`
}
@ -41,9 +26,8 @@ type ErrorFlowReplaced struct {
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewErrorFlowReplaced(message string) *ErrorFlowReplaced {
func NewErrorFlowReplaced() *ErrorFlowReplaced {
this := ErrorFlowReplaced{}
this.Message = message
return &this
}
@ -55,252 +39,36 @@ func NewErrorFlowReplacedWithDefaults() *ErrorFlowReplaced {
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetCode() int64 {
if o == nil || o.Code == nil {
var ret int64
// GetError returns the Error field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetError() GenericError {
if o == nil || o.Error == nil {
var ret GenericError
return ret
}
return *o.Code
return *o.Error
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetCodeOk() (*int64, bool) {
if o == nil || o.Code == nil {
func (o *ErrorFlowReplaced) GetErrorOk() (*GenericError, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Code, true
return o.Error, true
}
// HasCode returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasCode() bool {
if o != nil && o.Code != nil {
// HasError returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *ErrorFlowReplaced) SetCode(v int64) {
o.Code = &v
}
// GetDebug returns the Debug field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetDebug() string {
if o == nil || o.Debug == nil {
var ret string
return ret
}
return *o.Debug
}
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetDebugOk() (*string, bool) {
if o == nil || o.Debug == nil {
return nil, false
}
return o.Debug, true
}
// HasDebug returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasDebug() bool {
if o != nil && o.Debug != nil {
return true
}
return false
}
// SetDebug gets a reference to the given string and assigns it to the Debug field.
func (o *ErrorFlowReplaced) SetDebug(v string) {
o.Debug = &v
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetDetails() map[string]interface{} {
if o == nil || o.Details == nil {
var ret map[string]interface{}
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetDetailsOk() (map[string]interface{}, bool) {
if o == nil || o.Details == nil {
return nil, false
}
return o.Details, true
}
// HasDetails returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasDetails() bool {
if o != nil && o.Details != nil {
return true
}
return false
}
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
func (o *ErrorFlowReplaced) SetDetails(v map[string]interface{}) {
o.Details = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ErrorFlowReplaced) SetId(v string) {
o.Id = &v
}
// GetMessage returns the Message field value
func (o *ErrorFlowReplaced) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *ErrorFlowReplaced) SetMessage(v string) {
o.Message = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetReason() string {
if o == nil || o.Reason == nil {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetReasonOk() (*string, bool) {
if o == nil || o.Reason == nil {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasReason() bool {
if o != nil && o.Reason != nil {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *ErrorFlowReplaced) SetReason(v string) {
o.Reason = &v
}
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetRequest() string {
if o == nil || o.Request == nil {
var ret string
return ret
}
return *o.Request
}
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetRequestOk() (*string, bool) {
if o == nil || o.Request == nil {
return nil, false
}
return o.Request, true
}
// HasRequest returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasRequest() bool {
if o != nil && o.Request != nil {
return true
}
return false
}
// SetRequest gets a reference to the given string and assigns it to the Request field.
func (o *ErrorFlowReplaced) SetRequest(v string) {
o.Request = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ErrorFlowReplaced) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ErrorFlowReplaced) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *ErrorFlowReplaced) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *ErrorFlowReplaced) SetStatus(v string) {
o.Status = &v
// SetError gets a reference to the given GenericError and assigns it to the Error field.
func (o *ErrorFlowReplaced) SetError(v GenericError) {
o.Error = &v
}
// GetUseFlowId returns the UseFlowId field value if set, zero value otherwise.
@ -337,29 +105,8 @@ func (o *ErrorFlowReplaced) SetUseFlowId(v string) {
func (o ErrorFlowReplaced) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.Debug != nil {
toSerialize["debug"] = o.Debug
}
if o.Details != nil {
toSerialize["details"] = o.Details
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["message"] = o.Message
}
if o.Reason != nil {
toSerialize["reason"] = o.Reason
}
if o.Request != nil {
toSerialize["request"] = o.Request
}
if o.Status != nil {
toSerialize["status"] = o.Status
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.UseFlowId != nil {
toSerialize["use_flow_id"] = o.UseFlowId

View File

@ -17,33 +17,17 @@ import (
// NeedsPrivilegedSessionError struct for NeedsPrivilegedSessionError
type NeedsPrivilegedSessionError struct {
// The status code
Code *int64 `json:"code,omitempty"`
// Debug information This field is often not exposed to protect against leaking sensitive information.
Debug *string `json:"debug,omitempty"`
// Further error details
Details map[string]interface{} `json:"details,omitempty"`
// The error ID Useful when trying to identify various errors in application logic.
Id *string `json:"id,omitempty"`
// Error message The error's message.
Message string `json:"message"`
// A human-readable reason for the error
Reason *string `json:"reason,omitempty"`
Error *GenericError `json:"error,omitempty"`
// Points to where to redirect the user to next.
RedirectBrowserTo string `json:"redirect_browser_to"`
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
Request *string `json:"request,omitempty"`
// The status description
Status *string `json:"status,omitempty"`
}
// NewNeedsPrivilegedSessionError instantiates a new NeedsPrivilegedSessionError object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewNeedsPrivilegedSessionError(message string, redirectBrowserTo string) *NeedsPrivilegedSessionError {
func NewNeedsPrivilegedSessionError(redirectBrowserTo string) *NeedsPrivilegedSessionError {
this := NeedsPrivilegedSessionError{}
this.Message = message
this.RedirectBrowserTo = redirectBrowserTo
return &this
}
@ -56,188 +40,36 @@ func NewNeedsPrivilegedSessionErrorWithDefaults() *NeedsPrivilegedSessionError {
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetCode() int64 {
if o == nil || o.Code == nil {
var ret int64
// GetError returns the Error field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetError() GenericError {
if o == nil || o.Error == nil {
var ret GenericError
return ret
}
return *o.Code
return *o.Error
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetCodeOk() (*int64, bool) {
if o == nil || o.Code == nil {
func (o *NeedsPrivilegedSessionError) GetErrorOk() (*GenericError, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Code, true
return o.Error, true
}
// HasCode returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasCode() bool {
if o != nil && o.Code != nil {
// HasError returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *NeedsPrivilegedSessionError) SetCode(v int64) {
o.Code = &v
}
// GetDebug returns the Debug field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetDebug() string {
if o == nil || o.Debug == nil {
var ret string
return ret
}
return *o.Debug
}
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetDebugOk() (*string, bool) {
if o == nil || o.Debug == nil {
return nil, false
}
return o.Debug, true
}
// HasDebug returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasDebug() bool {
if o != nil && o.Debug != nil {
return true
}
return false
}
// SetDebug gets a reference to the given string and assigns it to the Debug field.
func (o *NeedsPrivilegedSessionError) SetDebug(v string) {
o.Debug = &v
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetDetails() map[string]interface{} {
if o == nil || o.Details == nil {
var ret map[string]interface{}
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetDetailsOk() (map[string]interface{}, bool) {
if o == nil || o.Details == nil {
return nil, false
}
return o.Details, true
}
// HasDetails returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasDetails() bool {
if o != nil && o.Details != nil {
return true
}
return false
}
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
func (o *NeedsPrivilegedSessionError) SetDetails(v map[string]interface{}) {
o.Details = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *NeedsPrivilegedSessionError) SetId(v string) {
o.Id = &v
}
// GetMessage returns the Message field value
func (o *NeedsPrivilegedSessionError) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *NeedsPrivilegedSessionError) SetMessage(v string) {
o.Message = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetReason() string {
if o == nil || o.Reason == nil {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetReasonOk() (*string, bool) {
if o == nil || o.Reason == nil {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasReason() bool {
if o != nil && o.Reason != nil {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *NeedsPrivilegedSessionError) SetReason(v string) {
o.Reason = &v
// SetError gets a reference to the given GenericError and assigns it to the Error field.
func (o *NeedsPrivilegedSessionError) SetError(v GenericError) {
o.Error = &v
}
// GetRedirectBrowserTo returns the RedirectBrowserTo field value
@ -264,99 +96,14 @@ func (o *NeedsPrivilegedSessionError) SetRedirectBrowserTo(v string) {
o.RedirectBrowserTo = v
}
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetRequest() string {
if o == nil || o.Request == nil {
var ret string
return ret
}
return *o.Request
}
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetRequestOk() (*string, bool) {
if o == nil || o.Request == nil {
return nil, false
}
return o.Request, true
}
// HasRequest returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasRequest() bool {
if o != nil && o.Request != nil {
return true
}
return false
}
// SetRequest gets a reference to the given string and assigns it to the Request field.
func (o *NeedsPrivilegedSessionError) SetRequest(v string) {
o.Request = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *NeedsPrivilegedSessionError) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NeedsPrivilegedSessionError) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *NeedsPrivilegedSessionError) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *NeedsPrivilegedSessionError) SetStatus(v string) {
o.Status = &v
}
func (o NeedsPrivilegedSessionError) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.Debug != nil {
toSerialize["debug"] = o.Debug
}
if o.Details != nil {
toSerialize["details"] = o.Details
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["message"] = o.Message
}
if o.Reason != nil {
toSerialize["reason"] = o.Reason
if o.Error != nil {
toSerialize["error"] = o.Error
}
if true {
toSerialize["redirect_browser_to"] = o.RedirectBrowserTo
}
if o.Request != nil {
toSerialize["request"] = o.Request
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
return json.Marshal(toSerialize)
}

View File

@ -18,26 +18,11 @@ import (
// SelfServiceFlowExpiredError Is sent when a flow is expired
type SelfServiceFlowExpiredError struct {
// The status code
Code *int64 `json:"code,omitempty"`
// Debug information This field is often not exposed to protect against leaking sensitive information.
Debug *string `json:"debug,omitempty"`
// Further error details
Details map[string]interface{} `json:"details,omitempty"`
Error *GenericError `json:"error,omitempty"`
// When the flow has expired
ExpiredAt *time.Time `json:"expired_at,omitempty"`
// The error ID Useful when trying to identify various errors in application logic.
Id *string `json:"id,omitempty"`
// Error message The error's message.
Message string `json:"message"`
// A human-readable reason for the error
Reason *string `json:"reason,omitempty"`
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
Request *string `json:"request,omitempty"`
// A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.
Since *int64 `json:"since,omitempty"`
// The status description
Status *string `json:"status,omitempty"`
// The flow ID that should be used for the new flow as it contains the correct messages.
UseFlowId *string `json:"use_flow_id,omitempty"`
}
@ -46,9 +31,8 @@ type SelfServiceFlowExpiredError struct {
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewSelfServiceFlowExpiredError(message string) *SelfServiceFlowExpiredError {
func NewSelfServiceFlowExpiredError() *SelfServiceFlowExpiredError {
this := SelfServiceFlowExpiredError{}
this.Message = message
return &this
}
@ -60,100 +44,36 @@ func NewSelfServiceFlowExpiredErrorWithDefaults() *SelfServiceFlowExpiredError {
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetCode() int64 {
if o == nil || o.Code == nil {
var ret int64
// GetError returns the Error field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetError() GenericError {
if o == nil || o.Error == nil {
var ret GenericError
return ret
}
return *o.Code
return *o.Error
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetCodeOk() (*int64, bool) {
if o == nil || o.Code == nil {
func (o *SelfServiceFlowExpiredError) GetErrorOk() (*GenericError, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Code, true
return o.Error, true
}
// HasCode returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasCode() bool {
if o != nil && o.Code != nil {
// HasError returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *SelfServiceFlowExpiredError) SetCode(v int64) {
o.Code = &v
}
// GetDebug returns the Debug field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetDebug() string {
if o == nil || o.Debug == nil {
var ret string
return ret
}
return *o.Debug
}
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetDebugOk() (*string, bool) {
if o == nil || o.Debug == nil {
return nil, false
}
return o.Debug, true
}
// HasDebug returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasDebug() bool {
if o != nil && o.Debug != nil {
return true
}
return false
}
// SetDebug gets a reference to the given string and assigns it to the Debug field.
func (o *SelfServiceFlowExpiredError) SetDebug(v string) {
o.Debug = &v
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetDetails() map[string]interface{} {
if o == nil || o.Details == nil {
var ret map[string]interface{}
return ret
}
return o.Details
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetDetailsOk() (map[string]interface{}, bool) {
if o == nil || o.Details == nil {
return nil, false
}
return o.Details, true
}
// HasDetails returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasDetails() bool {
if o != nil && o.Details != nil {
return true
}
return false
}
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
func (o *SelfServiceFlowExpiredError) SetDetails(v map[string]interface{}) {
o.Details = v
// SetError gets a reference to the given GenericError and assigns it to the Error field.
func (o *SelfServiceFlowExpiredError) SetError(v GenericError) {
o.Error = &v
}
// GetExpiredAt returns the ExpiredAt field value if set, zero value otherwise.
@ -188,126 +108,6 @@ func (o *SelfServiceFlowExpiredError) SetExpiredAt(v time.Time) {
o.ExpiredAt = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *SelfServiceFlowExpiredError) SetId(v string) {
o.Id = &v
}
// GetMessage returns the Message field value
func (o *SelfServiceFlowExpiredError) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *SelfServiceFlowExpiredError) SetMessage(v string) {
o.Message = v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetReason() string {
if o == nil || o.Reason == nil {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetReasonOk() (*string, bool) {
if o == nil || o.Reason == nil {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasReason() bool {
if o != nil && o.Reason != nil {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *SelfServiceFlowExpiredError) SetReason(v string) {
o.Reason = &v
}
// GetRequest returns the Request field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetRequest() string {
if o == nil || o.Request == nil {
var ret string
return ret
}
return *o.Request
}
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetRequestOk() (*string, bool) {
if o == nil || o.Request == nil {
return nil, false
}
return o.Request, true
}
// HasRequest returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasRequest() bool {
if o != nil && o.Request != nil {
return true
}
return false
}
// SetRequest gets a reference to the given string and assigns it to the Request field.
func (o *SelfServiceFlowExpiredError) SetRequest(v string) {
o.Request = &v
}
// GetSince returns the Since field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetSince() int64 {
if o == nil || o.Since == nil {
@ -340,38 +140,6 @@ func (o *SelfServiceFlowExpiredError) SetSince(v int64) {
o.Since = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetStatus() string {
if o == nil || o.Status == nil {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SelfServiceFlowExpiredError) GetStatusOk() (*string, bool) {
if o == nil || o.Status == nil {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *SelfServiceFlowExpiredError) HasStatus() bool {
if o != nil && o.Status != nil {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *SelfServiceFlowExpiredError) SetStatus(v string) {
o.Status = &v
}
// GetUseFlowId returns the UseFlowId field value if set, zero value otherwise.
func (o *SelfServiceFlowExpiredError) GetUseFlowId() string {
if o == nil || o.UseFlowId == nil {
@ -406,36 +174,15 @@ func (o *SelfServiceFlowExpiredError) SetUseFlowId(v string) {
func (o SelfServiceFlowExpiredError) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.Debug != nil {
toSerialize["debug"] = o.Debug
}
if o.Details != nil {
toSerialize["details"] = o.Details
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.ExpiredAt != nil {
toSerialize["expired_at"] = o.ExpiredAt
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["message"] = o.Message
}
if o.Reason != nil {
toSerialize["reason"] = o.Reason
}
if o.Request != nil {
toSerialize["request"] = o.Request
}
if o.Since != nil {
toSerialize["since"] = o.Since
}
if o.Status != nil {
toSerialize["status"] = o.Status
}
if o.UseFlowId != nil {
toSerialize["use_flow_id"] = o.UseFlowId
}

View File

@ -30,7 +30,7 @@ func NewErrorTestServer(t *testing.T, reg interface {
logger := logrusx.New("", "", logrusx.ForceLevel(logrus.TraceLevel))
writer := herodot.NewJSONWriter(logger)
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
e, err := reg.SelfServiceErrorPersister().Read(r.Context(), x.ParseUUID(r.URL.Query().Get("id")))
e, err := reg.SelfServiceErrorPersister().ReadErrorContainer(r.Context(), x.ParseUUID(r.URL.Query().Get("id")))
require.NoError(t, err)
t.Logf("Found error in NewErrorTestServer: %s", e.Errors)
writer.Write(w, r, e.Errors)

View File

@ -15,6 +15,7 @@ import (
"github.com/ory/jsonschema/v3"
"github.com/ory/herodot"
"github.com/ory/x/otelx"
"github.com/ory/x/sqlcon"
"github.com/ory/kratos/selfservice/errorx"
@ -22,11 +23,11 @@ import (
var _ errorx.Persister = new(Persister)
func (p *Persister) Add(ctx context.Context, csrfToken string, errs error) (uuid.UUID, error) {
ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.Add")
defer span.End()
func (p *Persister) CreateErrorContainer(ctx context.Context, csrfToken string, errs error) (containerID uuid.UUID, err error) {
ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.CreateErrorContainer")
defer otelx.End(span, &err)
buf, err := p.encodeSelfServiceErrors(ctx, errs)
message, err := p.encodeSelfServiceErrors(ctx, errs)
if err != nil {
return uuid.Nil, err
}
@ -35,7 +36,7 @@ func (p *Persister) Add(ctx context.Context, csrfToken string, errs error) (uuid
ID: uuid.Nil,
NID: p.NetworkID(ctx),
CSRFToken: csrfToken,
Errors: buf.Bytes(),
Errors: message,
WasSeen: false,
}
@ -46,9 +47,9 @@ func (p *Persister) Add(ctx context.Context, csrfToken string, errs error) (uuid
return c.ID, nil
}
func (p *Persister) Read(ctx context.Context, id uuid.UUID) (*errorx.ErrorContainer, error) {
ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.Read")
defer span.End()
func (p *Persister) ReadErrorContainer(ctx context.Context, id uuid.UUID) (_ *errorx.ErrorContainer, err error) {
ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.ReadErrorContainer")
defer otelx.End(span, &err)
var ec errorx.ErrorContainer
if err := p.GetConnection(ctx).Where("id = ? AND nid = ?", id, p.NetworkID(ctx)).First(&ec); err != nil {
@ -64,9 +65,9 @@ func (p *Persister) Read(ctx context.Context, id uuid.UUID) (*errorx.ErrorContai
return &ec, nil
}
func (p *Persister) Clear(ctx context.Context, olderThan time.Duration, force bool) (err error) {
ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.Clear")
defer span.End()
func (p *Persister) ClearErrorContainers(ctx context.Context, olderThan time.Duration, force bool) (err error) {
ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.ClearErrorContainers")
defer otelx.End(span, &err)
if force {
err = p.GetConnection(ctx).RawQuery(
@ -81,10 +82,7 @@ func (p *Persister) Clear(ctx context.Context, olderThan time.Duration, force bo
return sqlcon.HandleError(err)
}
func (p *Persister) encodeSelfServiceErrors(ctx context.Context, e error) (*bytes.Buffer, error) {
_, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.encodeSelfServiceErrors")
defer span.End()
func (p *Persister) encodeSelfServiceErrors(ctx context.Context, e error) ([]byte, error) {
if e == nil {
return nil, errors.WithStack(herodot.ErrInternalServerError.WithDebug("A nil error was passed to the error manager which is most likely a code bug."))
}
@ -102,5 +100,5 @@ func (p *Persister) encodeSelfServiceErrors(ctx context.Context, e error) (*byte
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReason("Unable to encode error messages.").WithDebug(err.Error()))
}
return &b, nil
return b.Bytes(), nil
}

View File

@ -107,7 +107,7 @@ func (h *Handler) fetchError(w http.ResponseWriter, r *http.Request) error {
return nil
}
es, err := h.r.SelfServiceErrorPersister().Read(r.Context(), x.ParseUUID(id))
es, err := h.r.SelfServiceErrorPersister().ReadErrorContainer(r.Context(), x.ParseUUID(id))
if err != nil {
return err
}

View File

@ -42,7 +42,7 @@ func TestHandler(t *testing.T) {
w.WriteHeader(http.StatusNoContent)
})
router.GET("/set-error", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
id, err := reg.SelfServiceErrorPersister().Add(context.Background(), nosurf.Token(r), herodot.ErrNotFound.WithReason("foobar"))
id, err := reg.SelfServiceErrorPersister().CreateErrorContainer(context.Background(), nosurf.Token(r), herodot.ErrNotFound.WithReason("foobar"))
require.NoError(t, err)
_, _ = w.Write([]byte(id.String()))
})
@ -104,7 +104,7 @@ func TestHandler(t *testing.T) {
} {
t.Run(fmt.Sprintf("case=%d", k), func(t *testing.T) {
csrf := x.NewUUID()
id, err := reg.SelfServiceErrorPersister().Add(context.Background(), csrf.String(), tc.gave)
id, err := reg.SelfServiceErrorPersister().CreateErrorContainer(context.Background(), csrf.String(), tc.gave)
require.NoError(t, err)
res, err := ts.Client().Get(ts.URL + errorx.RouteGet + "?id=" + id.String())

View File

@ -43,7 +43,7 @@ func NewManager(d managerDependencies) *Manager {
func (m *Manager) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, err error) (string, error) {
m.d.Logger().WithError(err).WithRequest(r).Errorf("An error occurred and is being forwarded to the error user interface.")
id, addErr := m.d.SelfServiceErrorPersister().Add(ctx, m.d.GenerateCSRFToken(r), err)
id, addErr := m.d.SelfServiceErrorPersister().CreateErrorContainer(ctx, m.d.GenerateCSRFToken(r), err)
if addErr != nil {
return "", addErr
}
@ -64,7 +64,8 @@ func (m *Manager) Forward(ctx context.Context, w http.ResponseWriter, r *http.Re
to, errCreate := m.Create(ctx, w, r, err)
if errCreate != nil {
// Everything failed. Resort to standard error output.
m.d.Writer().WriteError(w, r, errCreate)
m.d.Logger().WithError(errCreate).WithRequest(r).Error("Failed to create error container.")
m.d.Writer().WriteError(w, r, err)
return
}

View File

@ -12,16 +12,19 @@ import (
type (
Persister interface {
// Add adds an error to the manager and returns a unique identifier or an error if insertion fails.
Add(ctx context.Context, csrfToken string, err error) (uuid.UUID, error)
// CreateErrorContainer adds an error to the manager and returns a
// unique identifier or an error if insertion fails.
CreateErrorContainer(ctx context.Context, csrfToken string, err error) (uuid.UUID, error)
// Read returns an error by its unique identifier and marks the error as read. If an error occurs during retrieval
// the second return parameter is an error.
Read(ctx context.Context, id uuid.UUID) (*ErrorContainer, error)
// ReadErrorContainer returns an error by its unique identifier and
// marks the error as read. If an error occurs during retrieval the
// second return parameter is an error.
ReadErrorContainer(ctx context.Context, id uuid.UUID) (*ErrorContainer, error)
// Clear clears read containers that are older than a certain amount of time. If force is set to true, unread
// errors will be cleared as well.
Clear(ctx context.Context, olderThan time.Duration, force bool) error
// ClearErrorContainers clears read containers that are older than a
// certain amount of time. If force is set to true, unread errors will
// be cleared as well.
ClearErrorContainers(ctx context.Context, olderThan time.Duration, force bool) error
}
PersistenceProvider interface {

View File

@ -34,51 +34,51 @@ func TestPersister(ctx context.Context, p persistence.Persister) func(t *testing
_, p := testhelpers.NewNetworkUnlessExisting(t, ctx, p)
t.Run("case=not found", func(t *testing.T) {
_, err := p.Read(ctx, x.NewUUID())
_, err := p.ReadErrorContainer(ctx, x.NewUUID())
require.Error(t, err)
})
t.Run("case=en- and decode properly", func(t *testing.T) {
actualID, err := p.Add(ctx, "nosurf", herodot.ErrNotFound.WithReason("foobar"))
actualID, err := p.CreateErrorContainer(ctx, "nosurf", herodot.ErrNotFound.WithReason("foobar"))
require.NoError(t, err)
actual, err := p.Read(ctx, actualID)
actual, err := p.ReadErrorContainer(ctx, actualID)
require.NoError(t, err)
assert.JSONEq(t, `{"code":404,"status":"Not Found","reason":"foobar","message":"The requested resource could not be found"}`, gjson.Get(toJSON(t, actual), "error").String(), toJSON(t, actual))
})
t.Run("case=clear", func(t *testing.T) {
actualID, err := p.Add(ctx, "nosurf", herodot.ErrNotFound.WithReason("foobar"))
actualID, err := p.CreateErrorContainer(ctx, "nosurf", herodot.ErrNotFound.WithReason("foobar"))
require.NoError(t, err)
_, err = p.Read(ctx, actualID)
_, err = p.ReadErrorContainer(ctx, actualID)
require.NoError(t, err)
// We need to wait for at least one second or MySQL will randomly fail as it does not support
// millisecond resolution on timestamp columns.
time.Sleep(time.Second + time.Millisecond*500)
require.NoError(t, p.Clear(ctx, time.Second, false))
got, err := p.Read(ctx, actualID)
require.NoError(t, p.ClearErrorContainers(ctx, time.Second, false))
got, err := p.ReadErrorContainer(ctx, actualID)
require.Error(t, err, "%+v", got)
})
t.Run("case=network", func(t *testing.T) {
t.Run("can not read error from another network", func(t *testing.T) {
created, err := p.Add(ctx, "nosurf", herodot.ErrNotFound.WithReason("foobar"))
created, err := p.CreateErrorContainer(ctx, "nosurf", herodot.ErrNotFound.WithReason("foobar"))
require.NoError(t, err)
time.Sleep(time.Second + time.Millisecond*500)
_, other := testhelpers.NewNetwork(t, ctx, p)
_, err = other.Read(ctx, created)
_, err = other.ReadErrorContainer(ctx, created)
require.ErrorIs(t, err, sqlcon.ErrNoRows)
t.Run("can not clear another network", func(t *testing.T) {
_, other := testhelpers.NewNetwork(t, ctx, p)
require.NoError(t, other.Clear(ctx, time.Second, true))
require.NoError(t, other.ClearErrorContainers(ctx, time.Second, true))
c, err := p.Read(ctx, created)
c, err := p.ReadErrorContainer(ctx, created)
require.NoError(t, err)
assert.Contains(t, string(c.Errors), "foobar")
})

View File

@ -15,6 +15,7 @@ import (
"github.com/ory/kratos/ui/container"
"github.com/ory/kratos/ui/node"
"github.com/ory/kratos/x"
"github.com/ory/kratos/x/swagger"
"github.com/ory/x/urlx"
"github.com/gofrs/uuid"
@ -33,6 +34,16 @@ var (
// Is sent when a flow is replaced by a different flow of the same class
//
// swagger:model errorFlowReplaced
//
//nolint:deadcode,unused
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type errorFlowReplaced struct {
Error swagger.GenericError `json:"error"`
// The flow ID that should be used for the new flow as it contains the correct messages.
FlowID uuid.UUID `json:"use_flow_id"`
}
// ReplacedError is sent when a flow is replaced by a different flow of the same class
type ReplacedError struct {
*herodot.DefaultError `json:"error"`
@ -69,6 +80,25 @@ func NewFlowReplacedError(message *text.Message) *ReplacedError {
// Is sent when a flow is expired
//
// swagger:model selfServiceFlowExpiredError
//
//nolint:deadcode,unused
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type selfServiceFlowExpiredError struct {
Error swagger.GenericError `json:"error"`
// When the flow has expired
ExpiredAt time.Time `json:"expired_at"`
// Please use the "expired_at" field instead to have a more accurate result.
//
// Deprecated: true
Since time.Duration `json:"since"`
// The flow ID that should be used for the new flow as it contains the correct messages.
FlowID uuid.UUID `json:"use_flow_id"`
}
// ExpiredError is sent when a flow is expired
type ExpiredError struct {
*herodot.DefaultError `json:"error"`
@ -112,10 +142,21 @@ func NewFlowExpiredError(at time.Time) *ExpiredError {
// Is sent when a flow requires a browser to change its location.
//
// swagger:model errorBrowserLocationChangeRequired
//
//nolint:deadcode,unused
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type errorBrowserLocationChangeRequired struct {
Error swagger.ErrorGeneric `json:"error"`
// Points to where to redirect the user to next.
RedirectBrowserTo string `json:"redirect_browser_to"`
}
// BrowserLocationChangeRequiredError is sent when a flow requires a browser to change its location.
type BrowserLocationChangeRequiredError struct {
*herodot.DefaultError `json:"error"`
// Since when the flow has expired
// Points to where to redirect the user to next.
RedirectBrowserTo string `json:"redirect_browser_to"`
}

View File

@ -9,6 +9,7 @@ import (
"net/url"
"github.com/ory/kratos/session"
"github.com/ory/kratos/x/swagger"
"github.com/ory/kratos/ui/node"
@ -53,8 +54,11 @@ type (
// Is sent when a privileged session is required to perform the settings update.
//
// swagger:model needsPrivilegedSessionError
type FlowNeedsReAuth struct {
*herodot.DefaultError `json:"error"`
//
//nolint:deadcode,unused
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type needsPrivilegedSessionError struct {
Error swagger.GenericError `json:"error"`
// Points to where to redirect the user to next.
//
@ -62,6 +66,14 @@ type FlowNeedsReAuth struct {
RedirectBrowserTo string `json:"redirect_browser_to"`
}
// FlowNeedsReAuth is sent when a privileged session is required to perform the settings update.
type FlowNeedsReAuth struct {
*herodot.DefaultError `json:"error"`
// Points to where to redirect the user to next.
RedirectBrowserTo string `json:"redirect_browser_to"`
}
func (e *FlowNeedsReAuth) EnhanceJSONError() interface{} {
return e
}

View File

@ -125,8 +125,8 @@ func TestHandler(t *testing.T) {
t.Run("description=init a flow as API", func(t *testing.T) {
t.Run("description=without privileges", func(t *testing.T) {
res, body := initFlow(t, new(http.Client), true)
assert.Equal(t, http.StatusUnauthorized, res.StatusCode, "%s", body)
assert.Equal(t, text.ErrNoActiveSession, gjson.GetBytes(body, "error.id").String(), "%s", body)
assert.Equalf(t, http.StatusUnauthorized, res.StatusCode, "%s", body)
assert.Equalf(t, text.ErrNoActiveSession, gjson.GetBytes(body, "error.id").String(), "%s", body)
})
t.Run("description=success", func(t *testing.T) {
@ -139,7 +139,7 @@ func TestHandler(t *testing.T) {
t.Run("description=can not init if identity has aal2 but session has aal1", func(t *testing.T) {
conf.MustSet(ctx, config.ViperKeySelfServiceSettingsRequiredAAL, config.HighestAvailableAAL)
res, body := initFlow(t, aal2Identity, true)
assert.Equal(t, http.StatusForbidden, res.StatusCode, "%s", body)
assert.Equalf(t, http.StatusForbidden, res.StatusCode, "%s", body)
assertx.EqualAsJSON(t, session.NewErrAALNotSatisfied(publicTS.URL+"/self-service/login/browser?aal=aal2"), json.RawMessage(body))
})
})
@ -221,8 +221,8 @@ func TestHandler(t *testing.T) {
t.Run("description=init a flow as SPA", func(t *testing.T) {
t.Run("description=without privileges", func(t *testing.T) {
res, body := initSPAFlow(t, new(http.Client))
assert.Equal(t, http.StatusUnauthorized, res.StatusCode, "%s", body)
assert.Equal(t, text.ErrNoActiveSession, gjson.GetBytes(body, "error.id").String(), "%s", body)
assert.Equalf(t, http.StatusUnauthorized, res.StatusCode, "%s", body)
assert.Equalf(t, text.ErrNoActiveSession, gjson.GetBytes(body, "error.id").String(), "%s", body)
})
t.Run("description=success", func(t *testing.T) {
@ -254,7 +254,7 @@ func TestHandler(t *testing.T) {
_, _, err := testhelpers.NewSDKCustomClient(publicTS, otherUser).FrontendApi.GetSettingsFlow(context.Background()).Id("i-do-not-exist").Execute()
require.Error(t, err)
require.IsType(t, new(kratos.GenericOpenAPIError), err, "%T", err)
require.IsTypef(t, new(kratos.GenericOpenAPIError), err, "%T", err)
assert.Equal(t, int64(http.StatusNotFound), gjson.GetBytes(err.(*kratos.GenericOpenAPIError).Body(), "error.code").Int())
})
@ -265,7 +265,7 @@ func TestHandler(t *testing.T) {
_, _, err := testhelpers.NewSDKCustomClient(publicTS, primaryUser).FrontendApi.GetSettingsFlow(context.Background()).Id(pr.ID.String()).Execute()
require.Error(t, err)
require.IsType(t, new(kratos.GenericOpenAPIError), err, "%T", err)
require.IsTypef(t, new(kratos.GenericOpenAPIError), err, "%T", err)
assert.Equal(t, int64(http.StatusGone), gjson.GetBytes(err.(*kratos.GenericOpenAPIError).Body(), "error.code").Int())
})
@ -320,7 +320,7 @@ func TestHandler(t *testing.T) {
require.EqualValues(t, res.StatusCode, http.StatusForbidden)
body = ioutilx.MustReadAll(res.Body)
assert.Contains(t, gjson.GetBytes(body, "error.reason").String(), "The request was made for another identity and has been blocked for security reasons", "%s", body)
assert.Containsf(t, gjson.GetBytes(body, "error.reason").String(), "The request was made for another identity and has been blocked for security reasons", "%s", body)
})
t.Run("type=browser", func(t *testing.T) {
@ -332,7 +332,7 @@ func TestHandler(t *testing.T) {
_, _, err = testhelpers.NewSDKCustomClient(publicTS, otherUser).FrontendApi.GetSettingsFlow(context.Background()).Id(rid).Execute()
require.Error(t, err)
require.IsType(t, new(kratos.GenericOpenAPIError), err, "%T", err)
require.IsTypef(t, new(kratos.GenericOpenAPIError), err, "%T", err)
assert.Equal(t, int64(http.StatusForbidden), gjson.GetBytes(err.(*kratos.GenericOpenAPIError).Body(), "error.code").Int(), "should return a 403 error because the identities from the cookies do not match")
})

View File

@ -18,6 +18,7 @@ import (
"go.opentelemetry.io/otel/codes"
semconv "go.opentelemetry.io/otel/semconv/v1.11.0"
"go.opentelemetry.io/otel/trace"
grpccodes "google.golang.org/grpc/codes"
"github.com/ory/kratos/ui/node"
"github.com/ory/x/jsonnetsecure"
@ -352,6 +353,15 @@ func (e *WebHook) execute(ctx context.Context, data *templateContext) error {
resp, err := httpClient.Do(req)
if err != nil {
if isTimeoutError(err) {
return herodot.DefaultError{
CodeField: http.StatusGatewayTimeout,
StatusField: http.StatusText(http.StatusGatewayTimeout),
GRPCCodeField: grpccodes.DeadlineExceeded,
ErrorField: err.Error(),
ReasonField: "A third-party upstream service could not be reached. Please try again later.",
}.WithWrap(errors.WithStack(err))
}
return errors.WithStack(err)
}
defer resp.Body.Close()
@ -364,15 +374,18 @@ func (e *WebHook) execute(ctx context.Context, data *templateContext) error {
return err
}
}
return fmt.Errorf("webhook failed with status code %v", resp.StatusCode)
}
if parseResponse {
if err := parseWebhookResponse(resp, data.Identity); err != nil {
return err
return herodot.DefaultError{
CodeField: http.StatusBadGateway,
StatusField: http.StatusText(http.StatusBadGateway),
GRPCCodeField: grpccodes.Aborted,
ReasonField: "A third-party upstream service responded improperly. Please try again later.",
ErrorField: fmt.Sprintf("webhook failed with status code %v", resp.StatusCode),
}
}
if parseResponse {
return parseWebhookResponse(resp, data.Identity)
}
return nil
}
@ -474,3 +487,8 @@ func parseWebhookResponse(resp *http.Response, id *identity.Identity) (err error
return nil
}
func isTimeoutError(err error) bool {
var te interface{ Timeout() bool }
return errors.As(err, &te) && te.Timeout() || errors.Is(err, context.DeadlineExceeded)
}

View File

@ -144,6 +144,9 @@ func (s *Strategy) Register(w http.ResponseWriter, r *http.Request, f *registrat
credential, err := web.CreateCredential(NewUser(webAuthnSess.UserID, nil, web.Config), webAuthnSess, webAuthnResponse)
if err != nil {
if devErr := new(protocol.Error); errors.As(err, &devErr) {
s.d.Logger().WithError(err).WithField("error_devinfo", devErr.DevInfo).Error("Failed to create WebAuthn credential")
}
return s.handleRegistrationError(w, r, f, &p, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("Unable to create WebAuthn credential: %s", err)))
}

View File

@ -9,6 +9,7 @@ import (
"net/url"
"github.com/ory/kratos/text"
"github.com/ory/kratos/x/swagger"
"github.com/gofrs/uuid"
@ -41,9 +42,20 @@ func (e *ErrNoActiveSessionFound) EnhanceJSONError() interface{} {
return e
}
// ErrAALNotSatisfied is returned when an active session was found but the requested AAL is not satisfied.
// Is returned when an active session was found but the requested AAL is not satisfied.
//
// swagger:model errorAuthenticatorAssuranceLevelNotSatisfied
//
//nolint:deadcode,unused
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type errorAuthenticatorAssuranceLevelNotSatisfied struct {
Error swagger.GenericError `json:"error"`
// Points to where to redirect the user to next.
RedirectTo string `json:"redirect_browser_to"`
}
// ErrAALNotSatisfied is returned when an active session was found but the requested AAL is not satisfied.
type ErrAALNotSatisfied struct {
*herodot.DefaultError `json:"error"`
RedirectTo string `json:"redirect_browser_to"`

View File

@ -81,6 +81,7 @@
}
},
"schemas": {
"DefaultError": {},
"Duration": {
"description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.",
"format": "int64",
@ -628,151 +629,35 @@
},
"errorAuthenticatorAssuranceLevelNotSatisfied": {
"properties": {
"code": {
"description": "The status code",
"example": 404,
"format": "int64",
"type": "integer"
},
"debug": {
"description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.",
"example": "SQL field \"foo\" is not a bool.",
"type": "string"
},
"details": {
"additionalProperties": {},
"description": "Further error details",
"type": "object"
},
"id": {
"description": "The error ID\n\nUseful when trying to identify various errors in application logic.",
"type": "string"
},
"message": {
"description": "Error message\n\nThe error's message.",
"example": "The resource could not be found",
"type": "string"
},
"reason": {
"description": "A human-readable reason for the error",
"example": "User with ID 1234 does not exist.",
"type": "string"
"error": {
"$ref": "#/components/schemas/genericError"
},
"redirect_browser_to": {
"type": "string"
},
"request": {
"description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.",
"example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"type": "string"
},
"status": {
"description": "The status description",
"example": "Not Found",
"description": "Points to where to redirect the user to next.",
"type": "string"
}
},
"required": [
"message"
],
"title": "ErrAALNotSatisfied is returned when an active session was found but the requested AAL is not satisfied.",
"title": "Is returned when an active session was found but the requested AAL is not satisfied.",
"type": "object"
},
"errorBrowserLocationChangeRequired": {
"properties": {
"code": {
"description": "The status code",
"example": 404,
"format": "int64",
"type": "integer"
},
"debug": {
"description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.",
"example": "SQL field \"foo\" is not a bool.",
"type": "string"
},
"details": {
"additionalProperties": {},
"description": "Further error details",
"type": "object"
},
"id": {
"description": "The error ID\n\nUseful when trying to identify various errors in application logic.",
"type": "string"
},
"message": {
"description": "Error message\n\nThe error's message.",
"example": "The resource could not be found",
"type": "string"
},
"reason": {
"description": "A human-readable reason for the error",
"example": "User with ID 1234 does not exist.",
"type": "string"
"error": {
"$ref": "#/components/schemas/errorGeneric"
},
"redirect_browser_to": {
"description": "Since when the flow has expired",
"type": "string"
},
"request": {
"description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.",
"example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"type": "string"
},
"status": {
"description": "The status description",
"example": "Not Found",
"description": "Points to where to redirect the user to next.",
"type": "string"
}
},
"required": [
"message"
],
"title": "Is sent when a flow requires a browser to change its location.",
"type": "object"
},
"errorFlowReplaced": {
"description": "Is sent when a flow is replaced by a different flow of the same class",
"properties": {
"code": {
"description": "The status code",
"example": 404,
"format": "int64",
"type": "integer"
},
"debug": {
"description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.",
"example": "SQL field \"foo\" is not a bool.",
"type": "string"
},
"details": {
"additionalProperties": {},
"description": "Further error details",
"type": "object"
},
"id": {
"description": "The error ID\n\nUseful when trying to identify various errors in application logic.",
"type": "string"
},
"message": {
"description": "Error message\n\nThe error's message.",
"example": "The resource could not be found",
"type": "string"
},
"reason": {
"description": "A human-readable reason for the error",
"example": "User with ID 1234 does not exist.",
"type": "string"
},
"request": {
"description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.",
"example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"type": "string"
},
"status": {
"description": "The status description",
"example": "Not Found",
"type": "string"
"error": {
"$ref": "#/components/schemas/genericError"
},
"use_flow_id": {
"description": "The flow ID that should be used for the new flow as it contains the correct messages.",
@ -780,9 +665,6 @@
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"errorGeneric": {
@ -1461,53 +1343,15 @@
},
"needsPrivilegedSessionError": {
"properties": {
"code": {
"description": "The status code",
"example": 404,
"format": "int64",
"type": "integer"
},
"debug": {
"description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.",
"example": "SQL field \"foo\" is not a bool.",
"type": "string"
},
"details": {
"additionalProperties": {},
"description": "Further error details",
"type": "object"
},
"id": {
"description": "The error ID\n\nUseful when trying to identify various errors in application logic.",
"type": "string"
},
"message": {
"description": "Error message\n\nThe error's message.",
"example": "The resource could not be found",
"type": "string"
},
"reason": {
"description": "A human-readable reason for the error",
"example": "User with ID 1234 does not exist.",
"type": "string"
"error": {
"$ref": "#/components/schemas/genericError"
},
"redirect_browser_to": {
"description": "Points to where to redirect the user to next.",
"type": "string"
},
"request": {
"description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.",
"example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"type": "string"
},
"status": {
"description": "The status description",
"example": "Not Found",
"type": "string"
}
},
"required": [
"message",
"redirect_browser_to"
],
"title": "Is sent when a privileged session is required to perform the settings update.",
@ -1770,63 +1614,23 @@
"selfServiceFlowExpiredError": {
"description": "Is sent when a flow is expired",
"properties": {
"code": {
"description": "The status code",
"example": 404,
"format": "int64",
"type": "integer"
},
"debug": {
"description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.",
"example": "SQL field \"foo\" is not a bool.",
"type": "string"
},
"details": {
"additionalProperties": {},
"description": "Further error details",
"type": "object"
"error": {
"$ref": "#/components/schemas/genericError"
},
"expired_at": {
"description": "When the flow has expired",
"format": "date-time",
"type": "string"
},
"id": {
"description": "The error ID\n\nUseful when trying to identify various errors in application logic.",
"type": "string"
},
"message": {
"description": "Error message\n\nThe error's message.",
"example": "The resource could not be found",
"type": "string"
},
"reason": {
"description": "A human-readable reason for the error",
"example": "User with ID 1234 does not exist.",
"type": "string"
},
"request": {
"description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.",
"example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"type": "string"
},
"since": {
"$ref": "#/components/schemas/Duration"
},
"status": {
"description": "The status description",
"example": "Not Found",
"type": "string"
},
"use_flow_id": {
"description": "The flow ID that should be used for the new flow as it contains the correct messages.",
"format": "uuid",
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"selfServiceFlowType": {
@ -2464,6 +2268,9 @@
},
"type": "array"
},
"unexpectedError": {
"type": "string"
},
"updateIdentityBody": {
"description": "Update Identity Body",
"properties": {

View File

@ -1149,7 +1149,8 @@
"get": {
"description": "This endpoint returns a 200 status code when the HTTP server is up running.\nThis status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.",
"produces": [
"application/json"
"application/json",
"text/plain"
],
"tags": [
"health"
@ -1163,10 +1164,10 @@
"$ref": "#/definitions/healthStatus"
}
},
"500": {
"description": "genericError",
"default": {
"description": "unexpectedError",
"schema": {
"$ref": "#/definitions/genericError"
"$ref": "#/definitions/unexpectedError"
}
}
}
@ -1176,7 +1177,8 @@
"get": {
"description": "This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.",
"produces": [
"application/json"
"application/json",
"text/plain"
],
"tags": [
"health"
@ -1195,6 +1197,12 @@
"schema": {
"$ref": "#/definitions/healthNotReadyStatus"
}
},
"default": {
"description": "unexpectedError",
"schema": {
"$ref": "#/definitions/unexpectedError"
}
}
}
}
@ -2969,6 +2977,7 @@
}
},
"definitions": {
"DefaultError": {},
"Duration": {
"description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.",
"type": "integer",
@ -3474,155 +3483,36 @@
},
"errorAuthenticatorAssuranceLevelNotSatisfied": {
"type": "object",
"title": "ErrAALNotSatisfied is returned when an active session was found but the requested AAL is not satisfied.",
"required": [
"message"
],
"title": "Is returned when an active session was found but the requested AAL is not satisfied.",
"properties": {
"code": {
"description": "The status code",
"type": "integer",
"format": "int64",
"example": 404
},
"debug": {
"description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.",
"type": "string",
"example": "SQL field \"foo\" is not a bool."
},
"details": {
"description": "Further error details",
"type": "object",
"additionalProperties": {}
},
"id": {
"description": "The error ID\n\nUseful when trying to identify various errors in application logic.",
"type": "string"
},
"message": {
"description": "Error message\n\nThe error's message.",
"type": "string",
"example": "The resource could not be found"
},
"reason": {
"description": "A human-readable reason for the error",
"type": "string",
"example": "User with ID 1234 does not exist."
"error": {
"$ref": "#/definitions/genericError"
},
"redirect_browser_to": {
"description": "Points to where to redirect the user to next.",
"type": "string"
},
"request": {
"description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.",
"type": "string",
"example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6"
},
"status": {
"description": "The status description",
"type": "string",
"example": "Not Found"
}
}
},
"errorBrowserLocationChangeRequired": {
"type": "object",
"title": "Is sent when a flow requires a browser to change its location.",
"required": [
"message"
],
"properties": {
"code": {
"description": "The status code",
"type": "integer",
"format": "int64",
"example": 404
},
"debug": {
"description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.",
"type": "string",
"example": "SQL field \"foo\" is not a bool."
},
"details": {
"description": "Further error details",
"type": "object",
"additionalProperties": {}
},
"id": {
"description": "The error ID\n\nUseful when trying to identify various errors in application logic.",
"type": "string"
},
"message": {
"description": "Error message\n\nThe error's message.",
"type": "string",
"example": "The resource could not be found"
},
"reason": {
"description": "A human-readable reason for the error",
"type": "string",
"example": "User with ID 1234 does not exist."
"error": {
"$ref": "#/definitions/errorGeneric"
},
"redirect_browser_to": {
"description": "Since when the flow has expired",
"description": "Points to where to redirect the user to next.",
"type": "string"
},
"request": {
"description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.",
"type": "string",
"example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6"
},
"status": {
"description": "The status description",
"type": "string",
"example": "Not Found"
}
}
},
"errorFlowReplaced": {
"description": "Is sent when a flow is replaced by a different flow of the same class",
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"description": "The status code",
"type": "integer",
"format": "int64",
"example": 404
},
"debug": {
"description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.",
"type": "string",
"example": "SQL field \"foo\" is not a bool."
},
"details": {
"description": "Further error details",
"type": "object",
"additionalProperties": {}
},
"id": {
"description": "The error ID\n\nUseful when trying to identify various errors in application logic.",
"type": "string"
},
"message": {
"description": "Error message\n\nThe error's message.",
"type": "string",
"example": "The resource could not be found"
},
"reason": {
"description": "A human-readable reason for the error",
"type": "string",
"example": "User with ID 1234 does not exist."
},
"request": {
"description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.",
"type": "string",
"example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6"
},
"status": {
"description": "The status description",
"type": "string",
"example": "Not Found"
"error": {
"$ref": "#/definitions/genericError"
},
"use_flow_id": {
"description": "The flow ID that should be used for the new flow as it contains the correct messages.",
@ -4300,53 +4190,15 @@
"type": "object",
"title": "Is sent when a privileged session is required to perform the settings update.",
"required": [
"message",
"redirect_browser_to"
],
"properties": {
"code": {
"description": "The status code",
"type": "integer",
"format": "int64",
"example": 404
},
"debug": {
"description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.",
"type": "string",
"example": "SQL field \"foo\" is not a bool."
},
"details": {
"description": "Further error details",
"type": "object",
"additionalProperties": {}
},
"id": {
"description": "The error ID\n\nUseful when trying to identify various errors in application logic.",
"type": "string"
},
"message": {
"description": "Error message\n\nThe error's message.",
"type": "string",
"example": "The resource could not be found"
},
"reason": {
"description": "A human-readable reason for the error",
"type": "string",
"example": "User with ID 1234 does not exist."
"error": {
"$ref": "#/definitions/genericError"
},
"redirect_browser_to": {
"description": "Points to where to redirect the user to next.",
"type": "string"
},
"request": {
"description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.",
"type": "string",
"example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6"
},
"status": {
"description": "The status description",
"type": "string",
"example": "Not Found"
}
}
},
@ -4593,58 +4445,18 @@
"selfServiceFlowExpiredError": {
"description": "Is sent when a flow is expired",
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"description": "The status code",
"type": "integer",
"format": "int64",
"example": 404
},
"debug": {
"description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.",
"type": "string",
"example": "SQL field \"foo\" is not a bool."
},
"details": {
"description": "Further error details",
"type": "object",
"additionalProperties": {}
"error": {
"$ref": "#/definitions/genericError"
},
"expired_at": {
"description": "When the flow has expired",
"type": "string",
"format": "date-time"
},
"id": {
"description": "The error ID\n\nUseful when trying to identify various errors in application logic.",
"type": "string"
},
"message": {
"description": "Error message\n\nThe error's message.",
"type": "string",
"example": "The resource could not be found"
},
"reason": {
"description": "A human-readable reason for the error",
"type": "string",
"example": "User with ID 1234 does not exist."
},
"request": {
"description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.",
"type": "string",
"example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6"
},
"since": {
"$ref": "#/definitions/Duration"
},
"status": {
"description": "The status description",
"type": "string",
"example": "Not Found"
},
"use_flow_id": {
"description": "The flow ID that should be used for the new flow as it contains the correct messages.",
"type": "string",
@ -5245,6 +5057,9 @@
"$ref": "#/definitions/uiText"
}
},
"unexpectedError": {
"type": "string"
},
"updateIdentityBody": {
"description": "Update Identity Body",
"type": "object",

View File

@ -14,17 +14,13 @@ var PseudoPanic = herodot.DefaultError{
StatusField: http.StatusText(http.StatusInternalServerError),
ErrorField: "Code Bug Detected",
ReasonField: "The code ended up at a place where it should not have. Please report this as an issue at https://github.com/ory/kratos",
CodeField: http.StatusConflict,
}
type StatusCodeCarrier interface {
StatusCode() int
CodeField: http.StatusInternalServerError,
}
func RecoverStatusCode(err error, fallback int) int {
var sc StatusCodeCarrier
var sc herodot.StatusCodeCarrier
if errors.As(err, &sc) {
return (sc).StatusCode()
return sc.StatusCode()
}
return fallback
}

View File

@ -11,10 +11,3 @@ func PointToUUID(id uuid.UUID) *uuid.UUID {
}
return &id
}
func DerefUUID(id *uuid.UUID) uuid.UUID {
if id == nil {
return uuid.Nil
}
return *id
}

View File

@ -30,4 +30,4 @@
// ---
//
// swagger:meta
package main
package swagger

View File

@ -1,7 +1,7 @@
// Copyright © 2023 Ory Corp
// SPDX-License-Identifier: Apache-2.0
package main
package swagger
import "github.com/ory/herodot"
@ -13,13 +13,16 @@ import "github.com/ory/herodot"
//
//nolint:deadcode,unused
//lint:ignore U1000 Used to generate Swagger and OpenAPI definitions
type errorGeneric struct {
type ErrorGeneric struct {
// Contains error details
//
// required: true
Error herodot.DefaultError `json:"error"`
Error GenericError `json:"error"`
}
// swagger:model genericError
type GenericError struct{ herodot.DefaultError }
// Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201.
//
// swagger:response emptyResponse

View File

@ -1,7 +1,7 @@
// Copyright © 2023 Ory Corp
// SPDX-License-Identifier: Apache-2.0
package main
package swagger
import "github.com/go-openapi/strfmt"