memos-script/docs/AuthServiceApi.md

7.3 KiB

memos.AuthServiceApi

All URIs are relative to /

Method HTTP request Description
auth_service_get_auth_status POST /api/v2/auth/status GetAuthStatus returns the current auth status of the user.
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 POST /api/v2/auth/signin/sso SignInWithSSO signs in the user with the given SSO code.
auth_service_sign_out POST /api/v2/auth/signout SignOut signs out the user.
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

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

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

auth_service_sign_out

V2SignOutResponse auth_service_sign_out()

SignOut signs out the user.

Example

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

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

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

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

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]