Module: PlentyClient::Authentication
Constant Summary collapse
- AUTH_LOGIN =
'/login'.freeze
- AUTH_REFRESH =
'/login/refresh'.freeze
- AUTH_TOKEN =
'/oauth/access_token'.freeze
- AUTH_LOGOUT =
'/logout'.freeze
- AUTH_CLIENT =
'/client-login'.freeze
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
13 14 15 |
# File 'lib/plenty_client/authentication.rb', line 13 def access_token(headers = {}, &block) get(build_endpoint(AUTH_TOKEN), headers, &block) end |
.client_access_token(body = {}) ⇒ Object
29 30 31 |
# File 'lib/plenty_client/authentication.rb', line 29 def client_access_token(body = {}) post(build_endpoint(AUTH_CLIENT), body) end |
.login(body = {}) ⇒ Object
17 18 19 |
# File 'lib/plenty_client/authentication.rb', line 17 def login(body = {}) post(build_endpoint(AUTH_LOGIN), body) end |
.login_refresh(body = {}) ⇒ Object
21 22 23 |
# File 'lib/plenty_client/authentication.rb', line 21 def login_refresh(body = {}) post(build_endpoint(AUTH_REFRESH), body) end |
.logout(body = {}) ⇒ Object
25 26 27 |
# File 'lib/plenty_client/authentication.rb', line 25 def logout(body = {}) post(build_endpoint(AUTH_LOGOUT), body) end |