Skip to content

Commit

Permalink
Mark identityClaims as required, old identity properties as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sbryzak committed Jan 12, 2024
1 parent d5c7803 commit 5345e14
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions api/v1alpha1/useraccount_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type UserAccountSpec struct {

// UserID is the user ID from RHD Identity Provider token (“sub” claim)
// Is to be used to create Identity and UserIdentityMapping resources
// +optional
UserID string `json:"userID"`

// If set to true then the corresponding user should not be able to login
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/usersignup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ type UserSignupSpec struct {
TargetCluster string `json:"targetCluster,omitempty"`

// The user's user ID, obtained from the identity provider from the 'sub' (subject) claim
// +optional
Userid string `json:"userid"`

// The user's username, obtained from the identity provider.
// +optional
Username string `json:"username"`

// The user's first name, obtained from the identity provider.
Expand All @@ -199,7 +201,6 @@ type UserSignupSpec struct {
OriginalSub string `json:"originalSub,omitempty"`

// IdentityClaims contains as-is claim values extracted from the user's access token
// +optional
IdentityClaims IdentityClaimsEmbedded `json:"identityClaims,omitempty"`
}

Expand Down Expand Up @@ -231,7 +232,6 @@ type PropagatedClaims struct {
Sub string `json:"sub"`

// UserID contains the value of the 'user_id' claim
// +optional
UserID string `json:"userID,omitempty"`

// AccountID contains the value of the 'account_id' claim
Expand Down
2 changes: 0 additions & 2 deletions api/v1alpha1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5345e14

Please sign in to comment.