Skip to content

Commit

Permalink
feat: Return 410 when selfservice requests expire
Browse files Browse the repository at this point in the history
Closes #235
  • Loading branch information
aeneasr committed Mar 15, 2020
1 parent 8a71948 commit dd3d5d6
Show file tree
Hide file tree
Showing 83 changed files with 776 additions and 380 deletions.
27 changes: 21 additions & 6 deletions docs/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,12 @@
"$ref": "#/definitions/genericError"
}
},
"410": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
},
"500": {
"description": "genericError",
"schema": {
Expand Down Expand Up @@ -550,6 +556,12 @@
"$ref": "#/definitions/genericError"
}
},
"410": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
},
"500": {
"description": "genericError",
"schema": {
Expand Down Expand Up @@ -604,6 +616,12 @@
"$ref": "#/definitions/genericError"
}
},
"410": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
},
"500": {
"description": "genericError",
"schema": {
Expand Down Expand Up @@ -1116,12 +1134,9 @@
"example": "The database adapter was unable to find the element"
},
"details": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "object"
}
"type": "object",
"additionalProperties": {
"type": "object"
}
},
"message": {
Expand Down
4 changes: 4 additions & 0 deletions driver/registry_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ func (m *RegistryDefault) Ping() error {
return m.persister.Ping(context.Background())
}

func (m *RegistryDefault) SetCSRFTokenGenerator(g x.CSRFToken) {
m.csrfTokenGenerator = g
}

func (m *RegistryDefault) GenerateCSRFToken(r *http.Request) string {
if m.csrfTokenGenerator == nil {
m.csrfTokenGenerator = x.DefaultCSRFToken
Expand Down
27 changes: 12 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
module github.com/ory/kratos

go 1.13
go 1.14

require (
github.com/Masterminds/sprig/v3 v3.0.0
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0
github.com/bxcodec/faker v2.0.1+incompatible
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/fsnotify/fsnotify v1.4.7
github.com/fsnotify/fsnotify v1.4.9
github.com/ghodss/yaml v1.0.0
github.com/go-errors/errors v1.0.1
github.com/go-openapi/errors v0.19.3
github.com/go-openapi/runtime v0.19.11
github.com/go-openapi/strfmt v0.19.4
github.com/go-openapi/swag v0.19.7
github.com/go-openapi/validate v0.19.6
github.com/go-openapi/errors v0.19.4
github.com/go-openapi/runtime v0.19.12
github.com/go-openapi/strfmt v0.19.5
github.com/go-openapi/swag v0.19.8
github.com/go-openapi/validate v0.19.7
github.com/go-playground/locales v0.12.1 // indirect
github.com/go-playground/universal-translator v0.16.0 // indirect
github.com/go-swagger/go-swagger v0.22.0
github.com/go-swagger/go-swagger v0.23.0
github.com/gobuffalo/envy v1.9.0 // indirect
github.com/gobuffalo/httptest v1.0.2
github.com/gobuffalo/packd v1.0.0 // indirect
Expand All @@ -30,7 +30,6 @@ require (
github.com/golang/gddo v0.0.0-20190904175337-72a348e765d2
github.com/golang/mock v1.3.1
github.com/google/go-github/v27 v27.0.1
github.com/google/go-querystring v1.0.0
github.com/google/uuid v1.1.1
github.com/gorilla/context v1.1.1
github.com/gorilla/securecookie v1.1.1
Expand All @@ -50,11 +49,11 @@ require (
github.com/ory/go-acc v0.1.0
github.com/ory/go-convenience v0.1.0
github.com/ory/graceful v0.1.1
github.com/ory/herodot v0.6.3
github.com/ory/herodot v0.7.0
github.com/ory/jsonschema/v3 v3.0.1
github.com/ory/sdk/swagutil v0.0.0-20200202121523-307941feee4b
github.com/ory/viper v1.5.6
github.com/ory/x v0.0.95
github.com/ory/x v0.0.103
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pkg/errors v0.9.1
github.com/rogpeppe/go-internal v1.5.2 // indirect
Expand All @@ -68,11 +67,9 @@ require (
github.com/tidwall/gjson v1.3.5
github.com/tidwall/sjson v1.0.4
github.com/urfave/negroni v1.0.0
golang.org/x/crypto v0.0.0-20200210222208-86ce3cb69678
golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 // indirect
golang.org/x/tools v0.0.0-20200203215610-ab391d50b528
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
golang.org/x/tools v0.0.0-20200313205530-4303120df7d8
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/go-playground/validator.v9 v9.28.0
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
Expand Down
Loading

0 comments on commit dd3d5d6

Please sign in to comment.