Shine local API login
Default credentials (local dev)
Use these for http://localhost:5110 unless the user specifies otherwise:
| Field | Value |
|---|---|
username |
Palik |
password |
Palik0_ |
Risk: Credentials are stored in plaintext in this skill. Only for local development. Do not copy this skill into shared repos or sync it where others can read it.
Endpoint
- URL:
http://localhost:5110/api/users/login - Method:
POST - Headers:
Content-Type: application/json - Body:
{
"username": "Palik",
"password": "Palik0_"
}
Response
Successful responses include:
accessToken— JWT forAuthorization: Bearer <accessToken>refreshToken— use according to your API’s refresh flow (if documented)
curl examples (defaults above)
curl -sS -X POST http://localhost:5110/api/users/login \
-H "Content-Type: application/json" \
-d '{"username":"Palik","password":"Palik0_"}' \
| jq -r '.accessToken'
curl -sS -X POST http://localhost:5110/api/users/login \
-H "Content-Type: application/json" \
-d '{"username":"Palik","password":"Palik0_"}' \
| jq -r '.refreshToken'
Optional: override with env vars without editing the skill:
curl -sS -X POST http://localhost:5110/api/users/login \
-H "Content-Type: application/json" \
-d "{\"username\":\"${SHINE_USERNAME:-Palik}\",\"password\":\"${SHINE_PASSWORD:-Palik0_}\"}" \
| jq -r '.accessToken'
When the request fails (tips)
If login fails because nothing reaches the API (e.g. Connection refused, Failed to connect, ECONNREFUSED, timeouts, or empty/curl: (7) errors against localhost:5110):
- Port-forward identity-management so traffic to local port 5110 hits that service in the cluster. Until that tunnel is up,
http://localhost:5110/api/users/loginwill not work from your machine. - Typical shape (adjust namespace, service name, and container port to match your environment):
kubectl port-forward svc/identity-management 5110:<service-port> -n <namespace>
- If you get HTTP 4xx/5xx with a response body, the tunnel is usually fine—treat it as auth or server logic, not port-forward.
Agent workflow
- Ensure the users service is running on
localhost:5110(or adjust the URL if the user specifies another host/port). - Use the Default credentials table for login unless the user provides different username/password.
POSTthe JSON body and readaccessTokenandrefreshTokenfrom the JSON response.- When calling protected APIs, send
Authorization: Bearer <accessToken>.
If login fails:
- Connection / timeout / refused: Tell the user to port-forward the identity-management service to port 5110 (see When the request fails). Mention that this is the usual fix when localhost is not serving that API.
- HTTP errors with a body: Report status and body; do not echo the password unless needed for troubleshooting.