summaryrefslogtreecommitdiff
path: root/types/discovery/discovery.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-05-02 11:32:24 +0200
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2023-09-25 09:43:37 +0200
commit32e8a8cc3de868a59be7e5ae4fb9feea874f2331 (patch)
treeb0dc135fbc1c895a2812f656841b23ffdf246eab /types/discovery/discovery.go
parent16d28feb3430786deb7dc3273b82a7a8ebb94ac9 (diff)
Types Discovery: Omitempty for some types that are not always there
This makes sure that instead of "authentication_url_template": "" we get not even an "authentication_url_template" key This matches the upstream discovery format more 1:1
Diffstat (limited to 'types/discovery/discovery.go')
-rw-r--r--types/discovery/discovery.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/types/discovery/discovery.go b/types/discovery/discovery.go
index 0d3495a..bc22eab 100644
--- a/types/discovery/discovery.go
+++ b/types/discovery/discovery.go
@@ -49,17 +49,17 @@ type Servers struct {
// Server is a signle discovery server
type Server struct {
// AuthenticationURLTemplate is the template to be used for authentication to skip WAYF
- AuthenticationURLTemplate string `json:"authentication_url_template"`
+ AuthenticationURLTemplate string `json:"authentication_url_template,omitempty"`
// BaseURL is the base URL of the server which is used as an identifier for the server by the Go library
BaseURL string `json:"base_url"`
// CountryCode is the country code for the server in case of secure internet, e.g. NL
- CountryCode string `json:"country_code"`
+ CountryCode string `json:"country_code,omitempty"`
// DisplayName is the display name of the server, omitted if empty
DisplayName MapOrString `json:"display_name,omitempty"`
// DisplayName are the keywords of the server, omitted if empty
KeywordList MapOrString `json:"keyword_list,omitempty"`
// PublicKeyList are the public keys of the server. Currently not used in this lib but returned by the upstream discovery server
- PublicKeyList []string `json:"public_key_list"`
+ PublicKeyList []string `json:"public_key_list,omitempty"`
// Type is the type of the server, "secure_internet" or "institute_access"
Type string `json:"server_type"`
// SupportContact is the list/slice of support contacts