code: func (a *authorizer) UnmarshalJSON(data []byte) error {
  	var cognito struct {
  		Claims *map[string]string
  	}
  	var custom map[string]string
  
  	err := json.Unmarshal(data, &cognito)
  	if err != nil {
  		return err
  	}
  
  	if cognito.Claims != nil {
  		*a = authorizer(*cognito.Claims)
  		return nil
  	}
  
  	err = json.Unmarshal(data, &custom)
  	if err != nil {
  		return err
  	}
  
  	*a = authorizer(custom)
  	return nil
  }
docs: // UnmarshalJSON interprets the data as a dynamic map which may carry either a
  // Amazon Cognito set of claims or a custom set of attributes. It then choose
  // the good one at runtime and fill the authorizer with it.