diff --git a/ims/jwt_exchange.go b/ims/jwt_exchange.go index 28ee38d..f994f9f 100644 --- a/ims/jwt_exchange.go +++ b/ims/jwt_exchange.go @@ -65,12 +65,12 @@ func (i Config) AuthorizeJWTExchange() (TokenInfo, error) { } }() - // Metascopes are passed as generic claims with the format map[string]interface{} + // Metascopes are passed as generic claims with the format map[string]any // where the strings are in the form: baseIMSUrl/s/metascope - // and the interface{} is 'true' + // and the value is 'true' baseURL := strings.TrimRight(i.URL, "/") - claims := make(map[string]interface{}) + claims := make(map[string]any) for _, metascope := range i.Metascopes { claims[fmt.Sprintf("%s/s/%s", baseURL, metascope)] = true } diff --git a/ims/profile.go b/ims/profile.go index 9549594..6910c9c 100644 --- a/ims/profile.go +++ b/ims/profile.go @@ -78,7 +78,7 @@ func (i Config) GetProfile() (string, error) { func decodeProfile(profile []byte) (string, error) { // Parse the profile JSON - var p map[string]interface{} + var p map[string]any err := json.Unmarshal(profile, &p) if err != nil { return "", fmt.Errorf("error parsing profile JSON: %w", err) @@ -102,9 +102,9 @@ var fulfillableServiceCodes = map[string]bool{ "dx_genstudio": true, } -func findFulfillableData(data interface{}) { +func findFulfillableData(data any) { switch data := data.(type) { - case map[string]interface{}: + case map[string]any: for key, value := range data { if key == "fulfillable_data" { serviceCode, ok := data["serviceCode"].(string) @@ -126,7 +126,7 @@ func findFulfillableData(data interface{}) { findFulfillableData(value) } } - case []interface{}: + case []any: for _, item := range data { findFulfillableData(item) } diff --git a/ims/register.go b/ims/register.go index 9be70a5..d8a6358 100644 --- a/ims/register.go +++ b/ims/register.go @@ -40,7 +40,7 @@ func (i Config) Register() (string, error) { } // Build the request payload using json.Marshal for proper escaping. - payload, err := json.Marshal(map[string]interface{}{ + payload, err := json.Marshal(map[string]any{ "client_name": i.ClientName, "redirect_uris": i.RedirectURIs, })