Skip to content

Commit 5f5ccfc

Browse files
mfranciscDevtools
andauthored
return email in signup response (#555)
Co-authored-by: Devtools <[email protected]>
1 parent a48088a commit 5f5ccfc

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

pkg/controller/signup_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ func (s *TestSignupSuite) TestSignupGetHandler() {
170170
UserID: "0192837465",
171171
AccountID: "5647382910",
172172
AccountNumber: "4242",
173+
173174
}
174175

175176
// when

pkg/signup/service/signup_service.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ func (s *ServiceImpl) DoGetSignup(ctx *gin.Context, cl namespaced.Client, userna
360360
UserID: userSignup.Spec.IdentityClaims.UserID,
361361
AccountID: userSignup.Spec.IdentityClaims.AccountID,
362362
AccountNumber: userSignup.Spec.IdentityClaims.AccountNumber,
363+
Email: userSignup.Spec.IdentityClaims.Email,
363364
}
364365
if userSignup.Status.CompliantUsername != "" {
365366
signupResponse.CompliantUsername = userSignup.Status.CompliantUsername

pkg/signup/service/signup_service_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,7 @@ func (s *TestSignupServiceSuite) TestGetSignupStatusOK() {
798798
require.Equal(s.T(), username, response.Username)
799799
require.Equal(s.T(), us.Spec.IdentityClaims.GivenName, response.GivenName)
800800
require.Equal(s.T(), us.Spec.IdentityClaims.FamilyName, response.FamilyName)
801+
require.Equal(s.T(), us.Spec.IdentityClaims.Email, response.Email)
801802
require.Equal(s.T(), "ted", response.CompliantUsername)
802803

803804
require.Equal(s.T(), mur.Status.ProvisionedTime.UTC().Format(time.RFC3339), response.StartDate)

pkg/signup/signup.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ type Signup struct {
4545
AccountNumber string `json:"accountNumber,omitempty"`
4646
// AccountID from the Identity Provider
4747
AccountID string `json:"accountID,omitempty"`
48+
// Email from the Identity Provider
49+
Email string `json:"email,omitempty"`
4850

4951
Status Status `json:"status,omitempty"`
5052
// StartDate is the date that the user's current subscription started, in RFC3339 format

0 commit comments

Comments
 (0)