-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add account linking configs #4149
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add some tests on the newly added structs, like we did in pkg/lib/config/testdata/signup_flow_tests.yaml
.
var _ = Schema.Add("AuthenticationFlowAccountLinking", ` | ||
{ | ||
"type": "object", | ||
"required": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omit required
.
"properties": { | ||
"oauth": { | ||
"type": "array", | ||
"items": { "$ref": "#/$defs/AccountLinkingOAuth" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name the schema AuthenticationFlowAccountLinkOAuthItem
"required": ["alias", "oauth_claim", "user_profile", "action"], | ||
"properties": { | ||
"alias": { "type": "string" }, | ||
"oauth_claim": { "$ref": "#/$defs/AccountLinkingJSONPointer" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name the schema AuthenticationFlowAccountLinkingJSONPointer
"alias": { "type": "string" }, | ||
"oauth_claim": { "$ref": "#/$defs/AccountLinkingJSONPointer" }, | ||
"user_profile": { "$ref": "#/$defs/AccountLinkingJSONPointer" }, | ||
"action": { "$ref": "#/$defs/AccountLinkingOAuthAction" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name the schema AuthenticationFlowAccountLinkingAction
"type": "string", | ||
"format": "json-pointer" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "required": ["pointer"]
|
||
type AccountLinkingOAuth struct { | ||
Alias string `json:"alias,omitempty"` | ||
OAuthClaim AccountLinkingJSONPointer `json:"oauth_claim,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a pointer to AccountLinkingJSONPointer
type AccountLinkingOAuth struct { | ||
Alias string `json:"alias,omitempty"` | ||
OAuthClaim AccountLinkingJSONPointer `json:"oauth_claim,omitempty"` | ||
UserProfile AccountLinkingJSONPointer `json:"user_profile,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a pointer to AccountLinkingJSONPointer
Let me address the comments in #4159 |
ref #4111
ref DEV-1206