Skip to content
Snippets Groups Projects
Commit f655b2a7 authored by Bernard Roland (Student Com20)'s avatar Bernard Roland (Student Com20)
Browse files

Added API documentation for authentication

parent 85fbbc8e
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ facilitates effective collaboration.
* [Mockups](docs/mockups.md)
* [Accessibility Report](docs/accessibility.md)
* [User Documentation](docs/user-docs.md)
* [API Documentation](docs/user-docs.md)
* [API Documentation](docs/api-docs.md)
## Getting Started
......
# API v1 documentation
This document lists and describes all of the api paths in the current version of the backend api
implementation. The documentation is split into multiple different files:
* [Authentication](api/authentication.md)
* [Users](api/users.md)
* [Teams](api/teams.md)
* [Projects](api/projects.md)
* [Tasks](api/tasks.md)
* [Comments](api/comments.md)
* [Work](api/work.md)
## Authentication
### POST `/auth/register`
Register a new user account with the given username and password. Optionally a email and real name
can also be supplied.
#### Request body
```typescript
interface Body {
username: string;
password: string;
email?: string;
realname?: string;
}
```
#### Response body
```typescript
interface Body {
status: string;
token: string;
}
```
### POST `/auth/token`
Request a authentication token for this API. Only if the username and password match one of the
users registered, a token for authentication will be generated and returned.
#### Request body
```typescript
interface Body {
username: string;
password: string;
}
```
#### Response body
```typescript
interface Body {
status: string;
token: string;
}
```
### GET `/auth/extend` [requires authentication]
Request an extension of the token that is used during the request. After successful extension the
new token will be returned in the response body.
#### Response body
```typescript
interface Body {
status: string;
token: string;
}
```
### PUT `/auth/username` [requires authentication]
Request a change of the username for the current user.
#### Request body
```typescript
interface Body {
username: string;
}
```
### PUT `/auth/password` [requires authentication]
Request a change of the password for the current user.
#### Request body
```typescript
interface Body {
password: string;
}
```
## Comments
## Projects
## Tasks
## Teams
## Users
## Work
......@@ -14,3 +14,4 @@ This document includes some of the mockups created during the design phase of th
![Tasks](images/mockups/tasks.png)
![Team](images/mockups/teams.png)
![Team stats](images/mockups/teams-stats.png)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment