All URIs are relative to /api/v1
Method | HTTP request | Description |
---|---|---|
v1_get_token | GET /auth/token | Get Token |
v1_list_oauth2 | GET /auth/oauth2 | List Oauth2 |
v1_login | POST /auth/login | Login |
v1_logout | POST /auth/logout | Logout |
v1_oauth_authorize | GET /auth/oauth2/{oauth2}/authorize | Oauth Authorize |
v1_refresh | POST /auth/refresh | Refresh |
v1_register | POST /auth/register | Register |
AuthTokensResp v1_get_token(response_type, cookie=cookie, redirect_url=redirect_url)
Get Token
from __future__ import print_function
import time
import joj.horse_client
from joj.horse_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = joj.horse_client.AuthApi()
response_type = 'response_type_example' # str |
cookie = true # bool | Add Set/Delete-Cookie on response header (optional) (default to true)
redirect_url = 'redirect_url_example' # str | The redirect url after the operation (optional)
try:
# Get Token
api_response = api_instance.v1_get_token(response_type, cookie=cookie, redirect_url=redirect_url)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->v1_get_token: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
response_type | str | ||
cookie | bool | Add Set/Delete-Cookie on response header | [optional] [default to true] |
redirect_url | str | The redirect url after the operation | [optional] |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OAuth2ClientListResp v1_list_oauth2()
List Oauth2
from __future__ import print_function
import time
import joj.horse_client
from joj.horse_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = joj.horse_client.AuthApi()
try:
# List Oauth2
api_response = api_instance.v1_list_oauth2()
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->v1_list_oauth2: %s\n" % e)
This endpoint does not need any parameter.
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthTokensResp v1_login(response_type, grant_type=grant_type, username=username, password=password, scope=scope, client_id=client_id, client_secret=client_secret, cookie=cookie, redirect_url=redirect_url)
Login
from __future__ import print_function
import time
import joj.horse_client
from joj.horse_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = joj.horse_client.AuthApi()
response_type = 'response_type_example' # str |
grant_type = 'grant_type_example' # str | (optional)
username = 'username_example' # str | (optional)
password = 'password_example' # str | (optional)
scope = 'scope_example' # str | (optional)
client_id = 'client_id_example' # str | (optional)
client_secret = 'client_secret_example' # str | (optional)
cookie = true # bool | Add Set/Delete-Cookie on response header (optional) (default to true)
redirect_url = 'redirect_url_example' # str | The redirect url after the operation (optional)
try:
# Login
api_response = api_instance.v1_login(response_type, grant_type=grant_type, username=username, password=password, scope=scope, client_id=client_id, client_secret=client_secret, cookie=cookie, redirect_url=redirect_url)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->v1_login: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
response_type | str | ||
grant_type | str | [optional] | |
username | str | [optional] | |
password | str | [optional] | |
scope | str | [optional] | |
client_id | str | [optional] | |
client_secret | str | [optional] | |
cookie | bool | Add Set/Delete-Cookie on response header | [optional] [default to true] |
redirect_url | str | The redirect url after the operation | [optional] |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object v1_logout(response_type, cookie=cookie, redirect_url=redirect_url)
Logout
from __future__ import print_function
import time
import joj.horse_client
from joj.horse_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = joj.horse_client.AuthApi(joj.horse_client.ApiClient(configuration))
response_type = 'response_type_example' # str |
cookie = true # bool | Add Set/Delete-Cookie on response header (optional) (default to true)
redirect_url = 'redirect_url_example' # str | The redirect url after the operation (optional)
try:
# Logout
api_response = api_instance.v1_logout(response_type, cookie=cookie, redirect_url=redirect_url)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->v1_logout: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
response_type | str | ||
cookie | bool | Add Set/Delete-Cookie on response header | [optional] [default to true] |
redirect_url | str | The redirect url after the operation | [optional] |
object
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RedirectResp v1_oauth_authorize(oauth2, response_type, scopes=scopes, cookie=cookie, redirect_url=redirect_url)
Oauth Authorize
from __future__ import print_function
import time
import joj.horse_client
from joj.horse_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = joj.horse_client.AuthApi()
oauth2 = 'oauth2_example' # str | OAuth client name
response_type = 'response_type_example' # str |
scopes = ['scopes_example'] # list[str] | (optional)
cookie = true # bool | Add Set/Delete-Cookie on response header (optional) (default to true)
redirect_url = 'redirect_url_example' # str | The redirect url after the operation (optional)
try:
# Oauth Authorize
api_response = api_instance.v1_oauth_authorize(oauth2, response_type, scopes=scopes, cookie=cookie, redirect_url=redirect_url)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->v1_oauth_authorize: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
oauth2 | str | OAuth client name | |
response_type | str | ||
scopes | list[str] | [optional] | |
cookie | bool | Add Set/Delete-Cookie on response header | [optional] [default to true] |
redirect_url | str | The redirect url after the operation | [optional] |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthTokensResp v1_refresh(response_type, cookie=cookie, redirect_url=redirect_url)
Refresh
from __future__ import print_function
import time
import joj.horse_client
from joj.horse_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = joj.horse_client.AuthApi()
response_type = 'response_type_example' # str |
cookie = true # bool | Add Set/Delete-Cookie on response header (optional) (default to true)
redirect_url = 'redirect_url_example' # str | The redirect url after the operation (optional)
try:
# Refresh
api_response = api_instance.v1_refresh(response_type, cookie=cookie, redirect_url=redirect_url)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->v1_refresh: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
response_type | str | ||
cookie | bool | Add Set/Delete-Cookie on response header | [optional] [default to true] |
redirect_url | str | The redirect url after the operation | [optional] |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthTokensResp v1_register(body, response_type, cookie=cookie, redirect_url=redirect_url)
Register
from __future__ import print_function
import time
import joj.horse_client
from joj.horse_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = joj.horse_client.AuthApi(joj.horse_client.ApiClient(configuration))
body = joj.horse_client.UserCreate() # UserCreate |
response_type = 'response_type_example' # str |
cookie = true # bool | Add Set/Delete-Cookie on response header (optional) (default to true)
redirect_url = 'redirect_url_example' # str | The redirect url after the operation (optional)
try:
# Register
api_response = api_instance.v1_register(body, response_type, cookie=cookie, redirect_url=redirect_url)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->v1_register: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | UserCreate | ||
response_type | str | ||
cookie | bool | Add Set/Delete-Cookie on response header | [optional] [default to true] |
redirect_url | str | The redirect url after the operation | [optional] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]