Module: PlentyClient::Authentication
Constant Summary collapse
- AUTH_LOGIN =
'/login'
- AUTH_REFRESH =
'/login/refresh'
- AUTH_TOKEN =
'/oauth/access_token'
- AUTH_LOGOUT =
'/logout'
- AUTH_CLIENT =
'/client-login'
Class Method Summary collapse
- .access_token(headers = {}, &block) ⇒ Object
- .client_access_token(body = {}) ⇒ Object
- .login(body = {}) ⇒ Object
- .login_refresh(body = {}) ⇒ Object
- .logout(body = {}) ⇒ Object
Methods included from Request
Methods included from Endpoint
Class Method Details
.access_token(headers = {}, &block) ⇒ Object
15 16 17 |
# File 'lib/plenty_client/authentication.rb', line 15 def access_token(headers = {}, &block) get(build_endpoint(AUTH_TOKEN), headers, &block) end |
.client_access_token(body = {}) ⇒ Object
31 32 33 |
# File 'lib/plenty_client/authentication.rb', line 31 def client_access_token(body = {}) post(build_endpoint(AUTH_CLIENT), body) end |
.login(body = {}) ⇒ Object
19 20 21 |
# File 'lib/plenty_client/authentication.rb', line 19 def login(body = {}) post(build_endpoint(AUTH_LOGIN), body) end |
.login_refresh(body = {}) ⇒ Object
23 24 25 |
# File 'lib/plenty_client/authentication.rb', line 23 def login_refresh(body = {}) post(build_endpoint(AUTH_REFRESH), body) end |
.logout(body = {}) ⇒ Object
27 28 29 |
# File 'lib/plenty_client/authentication.rb', line 27 def logout(body = {}) post(build_endpoint(AUTH_LOGOUT), body) end |