Skip to content

Commit

Permalink
2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Phara0h committed Mar 31, 2021
1 parent 9cb2d8e commit e6e9d89
Show file tree
Hide file tree
Showing 3 changed files with 152 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@


#### [v2.2.0](https://github.com/Phara0h/travelling/compare/v2.1.0...v2.2.0)

- Update SDK and added Resetpassword with autologin endpoint and forgot password token endpoints. [`9cb2d8e`](https://github.com/Phara0h/travelling/commit/9cb2d8e4cc2e4a2f14ee56dd04cbbd5ba32a39ab)

#### [v2.1.0](https://github.com/Phara0h/travelling/compare/v2.0.0...v2.1.0)

> 19 March 2021
- Added options to handle using external email validation service and updated docs [`b3279da`](https://github.com/Phara0h/travelling/commit/b3279dadab2d009356e36cd9f773d21a0140a0fd)

### [v2.0.0](https://github.com/Phara0h/travelling/compare/v1.3.3...v2.0.0)
Expand Down
149 changes: 145 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -860,15 +860,21 @@ _Enables the requirement of each newly registered user to have a active user wit
<dd></dd>
<dt><a href="#Users">Users</a></dt>
<dd></dd>
<dt><a href="#UsersDomain">UsersDomain</a></dt>
<dd></dd>
<dt><a href="#User">User</a></dt>
<dd></dd>
<dt><a href="#UserCurrent">UserCurrent</a></dt>
<dd></dd>
<dt><a href="#Auth">Auth</a></dt>
<dd><h4 id="auth-endpoints">Auth endpoints</h4>
</dd>
<dt><a href="#AuthToken">AuthToken</a></dt>
<dd></dd>
<dt><a href="#AuthDomain">AuthDomain</a></dt>
<dd></dd>
<dt><a href="#AuthDomainToken">AuthDomainToken</a></dt>
<dd></dd>
</dl>

## Functions
Expand Down Expand Up @@ -2314,6 +2320,42 @@ Path: api/v1/users
| --- | --- | --- |
| authorization_bearer | <code>string</code> | The client_credentials generated OAUth2 access token. |

<a name="UsersDomain"></a>

## UsersDomain
**Kind**: global class
<a name="UsersDomain.get"></a>

### UsersDomain.get(authorization_bearer)
get - Gets all the users

##### Optional Query Params

| Param | Description |
| --- | --- |
| id | *optional* (example: 26c6aeff-ab95-4bdd-8260-534cf92d1c23) |
| username | *optional* (example: user7) |
| locked | *optional* (example: true) |
| locked_reason | *optional* (example: Activation Required email your admin to get your account activated) |
| group_request | *optional* (example: superadmin) |
| failed_login_attempts | *optional* (example: 0) |
| change_username | *optional* (example: false) |
| change_password | *optional* (example: false) |
| reset_password | *optional* (example: false) |
| email_verify | *optional* (example: false) |
| group_id | *optional* (example: 7320292c-627e-4e5a-b059-583eabdd6264) |
| email | *optional* (example: test@test.ai) |
| created_on | *optional* (example: 1568419646794) |
| last_login | *optional* (example: null) |

Path: api/v1/users

**Kind**: static method of [<code>UsersDomain</code>](#UsersDomain)

| Param | Type | Description |
| --- | --- | --- |
| authorization_bearer | <code>string</code> | The client_credentials generated OAUth2 access token. |

<a name="User"></a>

## User
Expand Down Expand Up @@ -2673,6 +2715,7 @@ Path: api/v1/user/me
* [.accessToken()](#Auth.accessToken)
* [.authorize(client_id, response_type, state, redirect_uri, group_request)](#Auth.authorize)
* [.activate(token)](#Auth.activate)
* [.resetPasswordAutoLogin(body, token)](#Auth.resetPasswordAutoLogin)
* [.resetPassword(body, token)](#Auth.resetPassword)
* [.forgotPassword(body)](#Auth.forgotPassword)
* [.logout()](#Auth.logout)
Expand Down Expand Up @@ -2717,10 +2760,31 @@ Path: api/v1/auth/activate
| --- | --- | --- |
| token | <code>any</code> | (example: activation_token) |

<a name="Auth.resetPasswordAutoLogin"></a>

### Auth.resetPasswordAutoLogin(body, token)
resetPasswordAutoLogin - Resets the password if the recovery token is valid of the user, then authenticates the user and returns cookies.

Path: api/v1/auth/password/reset/login

**Kind**: static method of [<code>Auth</code>](#Auth)

| Param | Type | Description |
| --- | --- | --- |
| body | <code>Object</code> | |
| token | <code>any</code> | (example: [thegeneratedtoken]) |

**Example**
body
```json
{
"password":"asdf"
}
```
<a name="Auth.resetPassword"></a>

### Auth.resetPassword(body, token)
resetPassword - Resets the password if the recovery token is vaild of the user.
resetPassword - Resets the password if the recovery token is valid of the user.

Path: api/v1/auth/password/reset

Expand Down Expand Up @@ -2755,8 +2819,7 @@ Path: api/v1/auth/password/forgot
body
```json
{
"email": "joseph@abe.ai",
"domain": "default"
"email": "test@test.com"
}
```
<a name="Auth.logout"></a>
Expand Down Expand Up @@ -2814,15 +2877,62 @@ body
"domain": "default"
}
```
<a name="AuthToken"></a>

## AuthToken
**Kind**: global class
<a name="AuthToken.forgotPassword"></a>

### AuthToken.forgotPassword(body)
forgotPassword - Generates a recovery token and returns the token to the attached user (if they exist) instead of sending an email.
*CAUTION SECURITY RISK: Would not expose this URL publicly or have it be allowed by anyone who is not a superadmin type level**

Path: api/v1/auth/password/forgot

**Kind**: static method of [<code>AuthToken</code>](#AuthToken)

| Param | Type |
| --- | --- |
| body | <code>Object</code> |

**Example**
body
```json
{
"email": "test@test.com"
}
```
<a name="AuthDomain"></a>

## AuthDomain
**Kind**: global class

* [AuthDomain](#AuthDomain)
* [.forgotPassword(body, domain)](#AuthDomain.forgotPassword)
* [.login(body, domain)](#AuthDomain.login)
* [.register(body, domain)](#AuthDomain.register)

<a name="AuthDomain.forgotPassword"></a>

### AuthDomain.forgotPassword(body, domain)
forgotPassword - Generates a recovery token and sends a email to the attached user (if they exist)

Path: api/v1/auth/password/forgot/domain/:domain

**Kind**: static method of [<code>AuthDomain</code>](#AuthDomain)

| Param | Type | Description |
| --- | --- | --- |
| body | <code>Object</code> | |
| domain | <code>any</code> | (example: test.com) |

**Example**
body
```json
{
"email": "test@test.com"
}
```
<a name="AuthDomain.login"></a>

### AuthDomain.login(body, domain)
Expand Down Expand Up @@ -2860,7 +2970,7 @@ Path: api/v1/auth/register/domain/:domain
| Param | Type | Description |
| --- | --- | --- |
| body | <code>Object</code> | |
| domain | <code>any</code> | (example: test) |
| domain | <code>any</code> | (example: test.com) |

**Example**
body
Expand All @@ -2871,6 +2981,31 @@ body
"email": "test@test.com"
}
```
<a name="AuthDomainToken"></a>

## AuthDomainToken
**Kind**: global class
<a name="AuthDomainToken.forgotPassword"></a>

### AuthDomainToken.forgotPassword(body)
forgotPassword - Generates a recovery token and returns the token to the attached user (if they exist) instead of sending an email.
*CAUTION SECURITY RISK: Would not expose this URL publicly or have it be allowed by anyone who is not a superadmin type level**

Path: api/v1/auth/password/forgot

**Kind**: static method of [<code>AuthDomainToken</code>](#AuthDomainToken)

| Param | Type |
| --- | --- |
| body | <code>Object</code> |

**Example**
body
```json
{
"email": "test@test.com"
}
```
<a name="SDK"></a>

## SDK(host, opts)
Expand All @@ -2894,8 +3029,14 @@ const { Travelling } = require('./sdk.js')('http://127.0.0.1');



#### [v2.2.0](https://github.com/Phara0h/travelling/compare/v2.1.0...v2.2.0)

- Update SDK and added Resetpassword with autologin endpoint and forgot password token endpoints. [`9cb2d8e`](https://github.com/Phara0h/travelling/commit/9cb2d8e4cc2e4a2f14ee56dd04cbbd5ba32a39ab)

#### [v2.1.0](https://github.com/Phara0h/travelling/compare/v2.0.0...v2.1.0)

> 19 March 2021
- Added options to handle using external email validation service and updated docs [`b3279da`](https://github.com/Phara0h/travelling/commit/b3279dadab2d009356e36cd9f773d21a0140a0fd)

### [v2.0.0](https://github.com/Phara0h/travelling/compare/v1.3.3...v2.0.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "travelling",
"version": "2.1.0",
"version": "2.2.0",
"description": "A dynamic route level groups permissions middleman service",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit e6e9d89

Please sign in to comment.