WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@IanVS
Copy link
Contributor

@IanVS IanVS commented Nov 7, 2025

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.

@IanVS
Copy link
Contributor Author

IanVS commented Nov 7, 2025

Needs tests still, but is this on the right track?

client.go Outdated
Org ConfigOrg
Network ConfigNetwork
Host ConfigHost
EndpointOIDC ConfigEndpointOIDC
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-nil

Organization HostOrgMetadata `json:"organization"`
Network HostNetworkMetadata `json:"network"`
Host HostHostMetadata `json:"host"`
EndpointOIDCMeta *HostEndpointOIDCMetadata `json:"endpointOIDC,omitempty"`
Copy link
Member

@johnmaguire johnmaguire Nov 7, 2025

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)

@johnmaguire
Copy link
Member

looks good

@IanVS
Copy link
Contributor Author

IanVS commented Nov 7, 2025

Doh I put it at the wrong level, thanks.

@IanVS IanVS requested a review from johnmaguire November 7, 2025 16:48
johnmaguire
johnmaguire previously approved these changes Nov 7, 2025
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)
Copy link
Member

@johnmaguire johnmaguire Nov 7, 2025

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

@IanVS IanVS merged commit 6a10587 into main Nov 7, 2025
2 checks passed
@IanVS IanVS deleted the endpoint-email branch November 7, 2025 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants