Admin unauthenticated
Identifiers
Section titled “Identifiers”| Field | Value |
|---|---|
| Type URI | https://echo.labstack.com/pro/problems/admin-unauthenticated |
| Code | admin_unauthenticated |
| HTTP status | 401 |
| HTTP status | English title |
|---|---|
| 401 | Unauthorized |
When it occurs
Section titled “When it occurs”The console could not authenticate the request: Config.Authenticate failed or returned an invalid principal, or middleware returned HTTP 401.
Client handling
Section titled “Client handling”Sign in again or send valid credentials. When the response carries a WWW-Authenticate challenge, follow it.
Example response
Section titled “Example response”If your application installs a custom handler, the body may differ.
HTTP/1.1 401 UnauthorizedContent-Type: application/problem+jsonCache-Control: no-store
{ "code": "admin_unauthenticated", "detail": "", "status": 401, "title": "Unauthorized", "type": "https://echo.labstack.com/pro/problems/admin-unauthenticated"}Server correction
Section titled “Server correction”Check that Config.Authenticate returns a principal with a nonempty ID and sets Session or HeaderCredential correctly.
Response fields
Section titled “Response fields”Admin console
Section titled “Admin console”code(string, always): The stable code above.detail(string, always): The console always sendsdetail. It is often empty and never contains the underlying error.status(integer, always): The HTTP status of the response.title(string, always): The HTTP status text, such asConflict, unless the panel supplies its own title.type(string, always): The exact type URI above.
Headers:
Cache-Control(always):no-store. The console sends it on every problem response, along with its usual security headers.WWW-Authenticate(conditional): The middleware’s challenge, kept so that, for example, Echo’s BasicAuth can prompt the browser.
Notes:
- Fields are written in alphabetical order.
- The console rewrites every 404 response to
admin_not_foundwith an emptydetail.
Related behavior
Section titled “Related behavior”See the admin console for access checks, action IDs and audit failures.