Skip to content

verify an identity block for a particular addresss#60

Merged
dovholuknf merged 9 commits intomainfrom
verify-address-for-identity
Feb 5, 2025
Merged

verify an identity block for a particular addresss#60
dovholuknf merged 9 commits intomainfrom
verify-address-for-identity

Conversation

@dovholuknf
Copy link
Member

No description provided.

identity.go Outdated

// ValidFor checks if the identity is valid for the given address
func ValidFor(id Identity, address string) error {
address = strings.TrimPrefix(address, "tls:")
Copy link
Member

@andrewpmartinez andrewpmartinez Feb 5, 2025

Choose a reason for hiding this comment

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

This should probably use url.Parse() so it will handle http:// and tls: and any other <proto>:[//]<hostname>:<port>[/<path>][?<querystring>] format. Still can use the .Host on it to then split hostname port. The URL parsing won't do that for you.

@dovholuknf dovholuknf merged commit 2bdf8e4 into main Feb 5, 2025
6 checks passed
@dovholuknf dovholuknf deleted the verify-address-for-identity branch February 5, 2025 20:09
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.

2 participants