Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Resumen


Excerpt

El sistema permite a las compañías usar e protocolo de autorización OAuth 2.0 para acceder al e-commerce de Komet a través de sistemas de terceros. En pocas palabras, al usuario se le solicita acceder a la aplicación, luego el servidor de autorización transfiere el token al agente de usuario (navegador) y este transfiere el token a la aplicación.


¿Qué tipo de concesión se usa para conectarse con Komet Sales?

Usamos Implicit, el cual es el tipo de concesión más popular para aplicación basadas web como Komet Sales. Es  importante señalar que este tipo de concesión no soporta tokens dinámicos (refresh tokens).

Instrucciones

 

Ui steps
sizesmall


Ui step

Contáctenos para que procedamos con la integración, dejándonos saber la URL del sitio web al cual serán redirigidos los usuarios.


Ui step

El equipo de Komet Sales procederá con la configuración y le enviará el servidor de autorización, el identificador del cliente (clientid) (which is used for the request) and the clientsecret, which is used in the request sent along with the token generated (step 6) in order to access directly to the E-commerce applicationel cual se usa para la petición) y el secreto del cliente (clientsecret), el cual se usa en el envío de la petición junto con el token generado (paso 6) para acceder directamente a la aplicación de E-commerce.


Ui step

You must enable the URL in your website, so your users can access to Komet Sales E-commerce portal. The next is an example of the Debe habilitar la URL en su sitio web de forma tal que usuarios puedan acceder al portal E-commerce de Komet Sales. El siguiente es un ejemplo de la URL:
 


xmlExample


response_type: always type  siempre tipo "token"

client_id: provided for  proporcionado por Komet Sales. It must be send in every requestDebe enviarse en cada petición.

redirect_uri: the URL where the user will be redirect. It must be sent in every request to avoid identity theft la URL donde el usuario será redirigido. Debe enviarse en cada petición para evitar suplantación.


Ui step

Once enabled, the user will click on your website in order to access to Komet Sales Shopping Portal. The user will be redirect to a page as the following if the user login for the first time, in order to authenticate their identity:



Ui step

Once the user enter the access credentials, the user should authorizes or deny the application access to their account.

 



Ui step

Once the user clicks on Approve, the service redirects the user to the defined URI and this URI will include the access token. You must execute a setup so your user-agent automatically uses this token for access to the E-commerce application. The token will be valid for 30 days. Once this period has elapsed, the token access must be renewed so the users can access directly to the application. The URI for access automatically to the E-commerce should It look like the following:


 

token: the authentication token for acess directly to the E-commerce (It can be taken from the URI)

client_id: provided for Komet Sales.
client_secret: provided for Komet Sales.
state (optional): alphanumeric. For security purposes. This value will be returned the same in the response.


Info
titleInformation

The system will provide you additional customer information along with the access token, such as customer id, code and name. This is made through an automatic request to the OAuth 2 server executed once the access token is saved.

The following is an example of the request and the response with the customer information:

Request


Code Block
languagejs
titleSample
## Oauth 2 - Local - Check Token curl -X "POST" "http://localhost:9090/oauth/check_token" \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \ -u '760b238e6eefd5a9cdf5152071ee096e:9e7a7bdeacc9625697e5226154cd2afed4c457fd8c10c8dc4c72b1f97fd2b18e' \ --data-urlencode "token=6d6ea94c-bf8e-4f8b-be18-6e66fe38f975"


Response


Code Block
languagejs
titleSample
 { "aud": [ "ks-ecommerce" ], "user_name": "diego+ecommerce@kometsales.com", "scope": [ "READ", "WRITE" ], "last_name": "Garcia", "customers": [ { "id": 141839, "code": "RD", "name": "Customer 6" }, { "id": 148121, "code": "148121", "name": "Customer 8" } ], "first_name": "Diego", "authorities": [ "ROLE_USER" ], "account": "4d544d344d44513d", "client_id": "0a448854c90376777bedb88f7b42da82" }






Panel
titleRelated Articles

Filter by label (Content by label)
showLabelsfalse
max10
showSpacefalse
sorttitle
cqllabel in ("integrations","external-systems","authentication")


Warning
titleImportant

This integration should be executed by an IT professional. In case you have any questions about the process, please contact us at support@kometsales.com.


Panel
borderColorCerulean
bgColorWhite
titleColorWhite
titleBGColorSteelBlue
titleKey Words

The user (Resource Owner): Makes the request through the link provided by the company.

Application: The third-party website.

User-Agent: The web-browser.