# Auth

## GET /api/v1/auth/

> Login methods

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]},{}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"LoginMethodsResponse":{"type":"object","properties":{"username_password_enabled":{"type":"boolean"},"oidc_providers":{"type":"array","items":{"$ref":"#/components/schemas/OIDCProviders"}},"session_timeout":{"type":"integer"}},"required":["session_timeout","username_password_enabled"]},"OIDCProviders":{"type":"object","properties":{"provider":{"type":"string"},"url":{"type":"string"}},"required":["provider","url"]}}},"paths":{"/api/v1/auth/":{"get":{"operationId":"auth_retrieve","description":"Login methods","tags":["Auth"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginMethodsResponse"}}},"description":"Success: Login methods"}}}}}}
```

## POST /api/v1/auth/

> Sign in as Syntho user

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]},{}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"SessionForm":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":255},"password":{"type":"string","maxLength":64,"minLength":8}},"required":["email","password"]},"SignedInResponse":{"type":"object","properties":{"new_password_required":{"type":"boolean"},"pk":{"type":"integer"}},"required":["new_password_required","pk"]}}},"paths":{"/api/v1/auth/":{"post":{"operationId":"auth_create","description":"Sign in as Syntho user","tags":["Auth","Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionForm"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedInResponse"}}},"description":"Success: Session Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedInResponse"}}},"description":"Error Bad Request: Invalid Credentials"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedInResponse"}}},"description":"Error: Unauthorized - this error means you submit an old (invalid) token alongside the login request."}}}}}}
```

## DELETE /api/v1/auth/

> Sign out

```json
{"openapi":"3.0.3","info":{"title":"Syntho Backend API","version":"1.0.0 (v1)"},"servers":[{"url":"/"}],"security":[{"authentication":[]},{"OIDC":[]},{}],"components":{"securitySchemes":{"authentication":{"type":"apiKey","in":"cookie","name":"sessionid","description":"Log in using the <a href='/api/playground/#/Auth/auth_create'>POST /api/v1/auth/</a> endpoint"},"OIDC":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"SignedOutResponse":{"type":"object","properties":{"status":{"type":"string","default":"OK"}}}}},"paths":{"/api/v1/auth/":{"delete":{"operationId":"auth_destroy","description":"Sign out","tags":["Auth"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedOutResponse"}}},"description":"Success: Session Deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedOutResponse"}}},"description":"Error: Unauthorized"}}}}}}
```
