Skip to content

Commit

Permalink
Merge pull request #1302 from virtualcell/1291-lost-password-jwt
Browse files Browse the repository at this point in the history
email with magic link to recover account
  • Loading branch information
jcschaff committed Jul 10, 2024
2 parents 12dc623 + b3f351f commit 9300d70
Show file tree
Hide file tree
Showing 25 changed files with 1,876 additions and 97 deletions.
2 changes: 2 additions & 0 deletions python-restclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ Class | Method | HTTP request | Description
*UsersResourceApi* | [**get_me**](docs/UsersResourceApi.md#get_me) | **GET** /api/v1/users/me | Get current user
*UsersResourceApi* | [**map_new_user**](docs/UsersResourceApi.md#map_new_user) | **POST** /api/v1/users/newUser | create vcell user
*UsersResourceApi* | [**map_user**](docs/UsersResourceApi.md#map_user) | **POST** /api/v1/users/mapUser | map vcell user
*UsersResourceApi* | [**process_magic_link**](docs/UsersResourceApi.md#process_magic_link) | **GET** /api/v1/users/processMagicLink | Process the magic link and map the user
*UsersResourceApi* | [**request_recovery_email**](docs/UsersResourceApi.md#request_recovery_email) | **POST** /api/v1/users/requestRecoveryEmail | request a recovery email to link a VCell account.
*UsersResourceApi* | [**unmap_user**](docs/UsersResourceApi.md#unmap_user) | **PUT** /api/v1/users/unmapUser/{userName} | remove vcell identity mapping


Expand Down
136 changes: 136 additions & 0 deletions python-restclient/docs/UsersResourceApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Method | HTTP request | Description
[**get_me**](UsersResourceApi.md#get_me) | **GET** /api/v1/users/me | Get current user
[**map_new_user**](UsersResourceApi.md#map_new_user) | **POST** /api/v1/users/newUser | create vcell user
[**map_user**](UsersResourceApi.md#map_user) | **POST** /api/v1/users/mapUser | map vcell user
[**process_magic_link**](UsersResourceApi.md#process_magic_link) | **GET** /api/v1/users/processMagicLink | Process the magic link and map the user
[**request_recovery_email**](UsersResourceApi.md#request_recovery_email) | **POST** /api/v1/users/requestRecoveryEmail | request a recovery email to link a VCell account.
[**unmap_user**](UsersResourceApi.md#unmap_user) | **PUT** /api/v1/users/unmapUser/{userName} | remove vcell identity mapping


Expand Down Expand Up @@ -480,6 +482,140 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **process_magic_link**
> process_magic_link(magic=magic)
Process the magic link and map the user

### Example

```python
import time
import os
import vcell_client
from vcell_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://vcell-dev.cam.uchc.edu
# See configuration.py for a list of all supported configuration parameters.
configuration = vcell_client.Configuration(
host = "https://vcell-dev.cam.uchc.edu"
)


# Enter a context with an instance of the API client
with vcell_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = vcell_client.UsersResourceApi(api_client)
magic = 'magic_example' # str | (optional)

try:
# Process the magic link and map the user
api_instance.process_magic_link(magic=magic)
except Exception as e:
print("Exception when calling UsersResourceApi->process_magic_link: %s\n" % e)
```



### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**magic** | **str**| | [optional]

### Return type

void (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | User mapped successfully | - |
**400** | Invalid or expired magic link | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **request_recovery_email**
> request_recovery_email(email=email, user_id=user_id)
request a recovery email to link a VCell account.

### Example

```python
import time
import os
import vcell_client
from vcell_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://vcell-dev.cam.uchc.edu
# See configuration.py for a list of all supported configuration parameters.
configuration = vcell_client.Configuration(
host = "https://vcell-dev.cam.uchc.edu"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Enter a context with an instance of the API client
with vcell_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = vcell_client.UsersResourceApi(api_client)
email = 'email_example' # str | (optional)
user_id = 'user_id_example' # str | (optional)

try:
# request a recovery email to link a VCell account.
api_instance.request_recovery_email(email=email, user_id=user_id)
except Exception as e:
print("Exception when calling UsersResourceApi->request_recovery_email: %s\n" % e)
```



### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**email** | **str**| | [optional]
**user_id** | **str**| | [optional]

### Return type

void (empty response body)

### Authorization

[openId](../README.md#openId)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | magic link sent in email if appropriate | - |
**400** | unable to process request | - |
**403** | Not Allowed | - |
**401** | Not Authorized | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **unmap_user**
> bool unmap_user(user_name)
Expand Down
Loading

0 comments on commit 9300d70

Please sign in to comment.