Rewrite Quick Start: split bearer token instructions for Docker vs bare metal
This commit is contained in:
parent
5859de5fdf
commit
79efef3ac2
1 changed files with 12 additions and 9 deletions
15
README.md
15
README.md
|
|
@ -74,14 +74,17 @@ AUTHELIA_API_DEVELOPMENT_MODE=true sudo ./install-authelia-api.sh
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
1. **Install using the script above**
|
**Get your bearer token:**
|
||||||
2. **Get your bearer token** (from Authelia configuration):
|
|
||||||
|
- **Docker:** The token is whatever you set as `session.secret` in your `configuration.yml`
|
||||||
|
```bash
|
||||||
|
curl -H "Authorization: Bearer your-session-secret-value" http://localhost:8080/api/health
|
||||||
|
```
|
||||||
|
|
||||||
|
- **Bare metal:** Read it from your existing Authelia configuration
|
||||||
```bash
|
```bash
|
||||||
grep -A2 "session:" /opt/authelia/configuration.yml | grep "secret:" | awk '{print $2}'
|
grep -A2 "session:" /opt/authelia/configuration.yml | grep "secret:" | awk '{print $2}'
|
||||||
```
|
curl -H "Authorization: Bearer THAT_VALUE" http://127.0.0.1:8080/api/health
|
||||||
3. **Test the API**:
|
|
||||||
```bash
|
|
||||||
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" http://127.0.0.1:8080/api/health
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## API Testing with Postman
|
## API Testing with Postman
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue