()
| 291 | } |
| 292 | |
| 293 | func getNonProtectedMethods() map[string]struct{} { |
| 294 | nonProtectedMethods := make(map[string]struct{}, 4) |
| 295 | |
| 296 | nonProtectedMethods[http.MethodGet] = struct{}{} |
| 297 | nonProtectedMethods[http.MethodHead] = struct{}{} |
| 298 | nonProtectedMethods[http.MethodTrace] = struct{}{} |
| 299 | nonProtectedMethods[http.MethodOptions] = struct{}{} |
| 300 | |
| 301 | return nonProtectedMethods |
| 302 | } |
| 303 | |
| 304 | func getTokenValue(tokenString string) string { |
| 305 | // TODO(ivan): check whether there are >1 elements |