-
Notifications
You must be signed in to change notification settings - Fork 1
Add endpoint oidc email to enroll response #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
Conversation
|
Needs tests still, but is this on the right track? |
client.go
Outdated
| Org ConfigOrg | ||
| Network ConfigNetwork | ||
| Host ConfigHost | ||
| EndpointOIDC ConfigEndpointOIDC |
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.
nil
client.go
Outdated
| } | ||
|
|
||
| type ConfigEndpointOIDC struct { | ||
| Email *string |
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.
non-nil
message/message.go
Outdated
| Organization HostOrgMetadata `json:"organization"` | ||
| Network HostNetworkMetadata `json:"network"` | ||
| Host HostHostMetadata `json:"host"` | ||
| EndpointOIDCMeta *HostEndpointOIDCMetadata `json:"endpointOIDC,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.
don't need omitempty on this side (same for DoUpdate)
|
looks good |
|
Doh I put it at the wrong level, thanks. |
| assert.Equal(t, hostID, meta.Host.ID) | ||
| assert.Equal(t, hostName, meta.Host.Name) | ||
| assert.Equal(t, hostIP, meta.Host.IPAddress) | ||
| assert.Equal(t, oidcEmail, meta.EndpointOIDC.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.
for completeness sake, you could add a assert.Nil(t, meta.EndpointOIDC) to an existing test. dubious value maybe
Takes the email that is exposed in https://github.com/DefinedNet/api/pull/1887 and passes it along to dnclient in the enroll and doUpdate responses.