Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
44 additions
and
17 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
selfservice/strategy/password/.schema/registration.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$id": "https://schemas.ory.sh/kratos/selfservice/strategy/password/registration.schema.json", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"required": [ | ||
"password", | ||
"traits" | ||
], | ||
"properties": { | ||
"password": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"traits": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package password | ||
|
||
import ( | ||
"github.com/markbates/pkger" | ||
|
||
"github.com/ory/kratos/x/pkgerx" | ||
) | ||
|
||
var loginSchema = pkgerx.MustRead(pkger.Open("/selfservice/strategy/password/.schema/login.schema.json")) | ||
var registrationSchema = pkgerx.MustRead(pkger.Open("/selfservice/strategy/password/.schema/registration.schema.json")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package pkgerx | ||
|
||
import ( | ||
"io" | ||
"io/ioutil" | ||
) | ||
|
||
func MustRead(closer io.ReadCloser, err error) []byte { | ||
out, err := ioutil.ReadAll(closer) | ||
if err != nil { | ||
_ = closer.Close() | ||
panic(err) | ||
} | ||
|
||
_ = closer.Close() | ||
return out | ||
} |