Skip to content

Commit

Permalink
test: update fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Feb 26, 2022
1 parent e614f6e commit 299c6e3
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "196d8c1e-4f04-40f0-94b3-5ec43996b28a",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "2ae6a5a7-2983-49e7-a4d8-7740b37c88cb",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "359963ec-b09b-4ea0-aece-fb4dd95f304a",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "5ff66179-c240-4703-b0d8-494592cefff5",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "d7b9addb-ac15-4bc2-9fa5-562e0bf48755",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "ed253b2c-48ed-4c58-9b6f-1dc963c30a66",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"identity": {
"id": "5ff66179-c240-4703-b0d8-494592cefff5",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"identity": {
"id": "5ff66179-c240-4703-b0d8-494592cefff5",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"identity": {
"id": "5ff66179-c240-4703-b0d8-494592cefff5",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"identity": {
"id": "5ff66179-c240-4703-b0d8-494592cefff5",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"identity": {
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"identity": {
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"identity": {
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"identity": {
"id": "5ff66179-c240-4703-b0d8-494592cefff5",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"identity": {
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"identity": {
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"identity": {
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"identity": {
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"identity": {
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"identity": {
"id": "a251ebc2-880c-4f76-a8f3-38e6940eab0e",
"schema_id": "default",
"schema_url": "https://www.ory.sh/schemas/default",
"schema_url": "https://www.ory.sh/schemas/ZGVmYXVsdA",
"state": "active",
"traits": {
"email": "[email protected]"
Expand Down
16 changes: 10 additions & 6 deletions schema/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,18 @@ func (h *Handler) getByID(w http.ResponseWriter, r *http.Request, ps httprouter.
}

id := ps.ByName("id")
if dec, err := base64.RawURLEncoding.DecodeString(ps.ByName("id")); err == nil {
id = string(dec)
}

s, err := ss.GetByID(id)
if err != nil {
h.r.Writer().WriteError(w, r, errors.WithStack(herodot.ErrNotFound.WithDebugf("%+v", err)))
return
// Maybe it is a base64 encoded ID?
if dec, err := base64.RawURLEncoding.DecodeString(id); err == nil {
id = string(dec)
}

s, err = ss.GetByID(id)
if err != nil {
h.r.Writer().WriteError(w, r, errors.WithStack(herodot.ErrNotFound.WithDebugf("%+v", err)))
return
}
}

src, err := ReadSchema(s)
Expand Down

0 comments on commit 299c6e3

Please sign in to comment.