GetAPIKey returns the resolved API key from the echo context, or nil. Nil for session-cookie and legacy-env-key authentication.
(c echo.Context)
| 219 | // GetAPIKey returns the resolved API key from the echo context, or nil. |
| 220 | // Nil for session-cookie and legacy-env-key authentication. |
| 221 | func GetAPIKey(c echo.Context) *UserAPIKey { |
| 222 | k, _ := c.Get(contextKeyAPIKey).(*UserAPIKey) |
| 223 | return k |
| 224 | } |
| 225 | |
| 226 | // GetSource returns the request's authentication source: UsageSourceAPIKey, |
| 227 | // UsageSourceWeb, UsageSourceLegacy, or empty if no authentication was performed. |
no test coverage detected