code: func GetMethodSecuredBy(apiDef *raml.APIDefinition, r *raml.Resource, m *raml.Method) []raml.DefinitionChoice {
  	// get the secured by
  	securedBy := func() []raml.DefinitionChoice {
  		if len(m.SecuredBy) > 0 {
  			return m.SecuredBy
  		} else if sb := FindResourceSecuredBy(r); len(sb) > 0 {
  			return sb
  		}
  		return apiDef.SecuredBy
  	}()
  
  	// filter only security scheme we supported
  	var filtered []raml.DefinitionChoice
  	for _, sb := range securedBy {
  		ss, ok := apiDef.SecuritySchemes[sb.Name]
  		if !ok {
  			continue
  		}
  		if !Supported(ss) {
  			continue
  		}
  		filtered = append(filtered, sb)
  	}
  	return filtered
  }
docs: // GetMethodSecuredBy get SecuredBy field of a method