-
Notifications
You must be signed in to change notification settings - Fork 9
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
[CLOUDTRUST-2295] Bridge endpoint to self-ask for an email validation #183
Conversation
Pull Request Test Coverage Report for Build 1874
💛 - Coveralls |
Gopkg.toml
Outdated
|
||
[[constraint]] | ||
name = "github.com/cloudtrust/keycloak-client" | ||
branch = "dev" | ||
branch = "jira-2296" |
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.
To be updated before merging
@@ -15,6 +16,12 @@ import ( | |||
kc "github.com/cloudtrust/keycloak-client" | |||
) | |||
|
|||
// Constants | |||
const ( | |||
ActionVerifyEmail = "VERIFY_EMAIL" |
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.
why 2 diff styles?
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.
Yes... one comes from Keycloak, the other one comes from 2019.kc-sms
pkg/account/component.go
Outdated
@@ -27,6 +34,8 @@ type KeycloakAccountClient interface { | |||
UpdateAccount(accessToken, realm string, user kc.UserRepresentation) error | |||
GetAccount(accessToken, realm string) (kc.UserRepresentation, error) | |||
DeleteAccount(accessToken, realm string) error | |||
ExecuteActionsEmail(accessToken string, realmName string, actions []string) error | |||
//ExecuteActionsEmail(accessToken string, actions []string, paramKV ...string) error |
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.
maybe remove the second line
a9780fa
to
5fbdef5
Compare
api/account/swagger-api_account.yaml
Outdated
@@ -160,7 +160,22 @@ paths: | |||
responses: | |||
200: | |||
description: Successful operation. | |||
|
|||
/account/send-verify-email: |
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.
Maybe we could remove the "send" in URL to have /account/verify-email as it would sounds more RESTful
pkg/account/component.go
Outdated
var additionalInfos = map[string]string{"actions": strings.Join(actions, ",")} | ||
var additionalBytes, _ = json.Marshal(additionalInfos) | ||
var additionalString = string(additionalBytes) | ||
c.reportEvent(ctx, "ACTION_EMAIL", database.CtEventRealmName, currentRealm, database.CtEventUserID, userID, database.CtEventAdditionalInfo, additionalString) |
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.
ACTION_EMAIL must be sent only for VERIFY_EMAIL ? If yes, maybe we should have another specific event for verify phone number ?
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.
Retest OK!
61fac01
to
0a67a1f
Compare
[CLOUDTRUST-2296] Bridge endpoint to self-ask for a phone number validation [CLOUDTRUST-2299] Send email when user updates his email/phone. Unvalidate his account validation
0a67a1f
to
b3c7a13
Compare
[CLOUDTRUST-2296] Bridge endpoint to self-ask for a phone number validation
[CLOUDTRUST-2299] Send email when user updates his email/phone. Unvalidate his account validation
Refers to: