245 lines
7.3 KiB
Markdown
245 lines
7.3 KiB
Markdown
# memos.AuthServiceApi
|
|
|
|
All URIs are relative to */*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**auth_service_get_auth_status**](AuthServiceApi.md#auth_service_get_auth_status) | **POST** /api/v2/auth/status | GetAuthStatus returns the current auth status of the user.
|
|
[**auth_service_sign_in**](AuthServiceApi.md#auth_service_sign_in) | **POST** /api/v2/auth/signin | SignIn signs in the user with the given username and password.
|
|
[**auth_service_sign_in_with_sso**](AuthServiceApi.md#auth_service_sign_in_with_sso) | **POST** /api/v2/auth/signin/sso | SignInWithSSO signs in the user with the given SSO code.
|
|
[**auth_service_sign_out**](AuthServiceApi.md#auth_service_sign_out) | **POST** /api/v2/auth/signout | SignOut signs out the user.
|
|
[**auth_service_sign_up**](AuthServiceApi.md#auth_service_sign_up) | **POST** /api/v2/auth/signup | SignUp signs up the user with the given username and password.
|
|
|
|
# **auth_service_get_auth_status**
|
|
> V2GetAuthStatusResponse auth_service_get_auth_status()
|
|
|
|
GetAuthStatus returns the current auth status of the user.
|
|
|
|
### Example
|
|
```python
|
|
from __future__ import print_function
|
|
import time
|
|
import memos
|
|
from memos.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# create an instance of the API class
|
|
api_instance = memos.AuthServiceApi()
|
|
|
|
try:
|
|
# GetAuthStatus returns the current auth status of the user.
|
|
api_response = api_instance.auth_service_get_auth_status()
|
|
pprint(api_response)
|
|
except ApiException as e:
|
|
print("Exception when calling AuthServiceApi->auth_service_get_auth_status: %s\n" % e)
|
|
```
|
|
|
|
### Parameters
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**V2GetAuthStatusResponse**](V2GetAuthStatusResponse.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **auth_service_sign_in**
|
|
> V2SignInResponse auth_service_sign_in(username=username, password=password, never_expire=never_expire)
|
|
|
|
SignIn signs in the user with the given username and password.
|
|
|
|
### Example
|
|
```python
|
|
from __future__ import print_function
|
|
import time
|
|
import memos
|
|
from memos.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# create an instance of the API class
|
|
api_instance = memos.AuthServiceApi()
|
|
username = 'username_example' # str | (optional)
|
|
password = 'password_example' # str | (optional)
|
|
never_expire = true # bool | (optional)
|
|
|
|
try:
|
|
# SignIn signs in the user with the given username and password.
|
|
api_response = api_instance.auth_service_sign_in(username=username, password=password, never_expire=never_expire)
|
|
pprint(api_response)
|
|
except ApiException as e:
|
|
print("Exception when calling AuthServiceApi->auth_service_sign_in: %s\n" % e)
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**username** | **str**| | [optional]
|
|
**password** | **str**| | [optional]
|
|
**never_expire** | **bool**| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**V2SignInResponse**](V2SignInResponse.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **auth_service_sign_in_with_sso**
|
|
> V2SignInWithSSOResponse auth_service_sign_in_with_sso(idp_id=idp_id, code=code, redirect_uri=redirect_uri)
|
|
|
|
SignInWithSSO signs in the user with the given SSO code.
|
|
|
|
### Example
|
|
```python
|
|
from __future__ import print_function
|
|
import time
|
|
import memos
|
|
from memos.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# create an instance of the API class
|
|
api_instance = memos.AuthServiceApi()
|
|
idp_id = 56 # int | (optional)
|
|
code = 'code_example' # str | (optional)
|
|
redirect_uri = 'redirect_uri_example' # str | (optional)
|
|
|
|
try:
|
|
# SignInWithSSO signs in the user with the given SSO code.
|
|
api_response = api_instance.auth_service_sign_in_with_sso(idp_id=idp_id, code=code, redirect_uri=redirect_uri)
|
|
pprint(api_response)
|
|
except ApiException as e:
|
|
print("Exception when calling AuthServiceApi->auth_service_sign_in_with_sso: %s\n" % e)
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**idp_id** | **int**| | [optional]
|
|
**code** | **str**| | [optional]
|
|
**redirect_uri** | **str**| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**V2SignInWithSSOResponse**](V2SignInWithSSOResponse.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **auth_service_sign_out**
|
|
> V2SignOutResponse auth_service_sign_out()
|
|
|
|
SignOut signs out the user.
|
|
|
|
### Example
|
|
```python
|
|
from __future__ import print_function
|
|
import time
|
|
import memos
|
|
from memos.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# create an instance of the API class
|
|
api_instance = memos.AuthServiceApi()
|
|
|
|
try:
|
|
# SignOut signs out the user.
|
|
api_response = api_instance.auth_service_sign_out()
|
|
pprint(api_response)
|
|
except ApiException as e:
|
|
print("Exception when calling AuthServiceApi->auth_service_sign_out: %s\n" % e)
|
|
```
|
|
|
|
### Parameters
|
|
This endpoint does not need any parameter.
|
|
|
|
### Return type
|
|
|
|
[**V2SignOutResponse**](V2SignOutResponse.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|
|
# **auth_service_sign_up**
|
|
> V2SignUpResponse auth_service_sign_up(username=username, password=password)
|
|
|
|
SignUp signs up the user with the given username and password.
|
|
|
|
### Example
|
|
```python
|
|
from __future__ import print_function
|
|
import time
|
|
import memos
|
|
from memos.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# create an instance of the API class
|
|
api_instance = memos.AuthServiceApi()
|
|
username = 'username_example' # str | (optional)
|
|
password = 'password_example' # str | (optional)
|
|
|
|
try:
|
|
# SignUp signs up the user with the given username and password.
|
|
api_response = api_instance.auth_service_sign_up(username=username, password=password)
|
|
pprint(api_response)
|
|
except ApiException as e:
|
|
print("Exception when calling AuthServiceApi->auth_service_sign_up: %s\n" % e)
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**username** | **str**| | [optional]
|
|
**password** | **str**| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**V2SignUpResponse**](V2SignUpResponse.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
[[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)
|
|
|