Layer7 API Management

  • 1.  API Portal 4.2 : Login API OTK Token Endpoint

    Posted Jan 31, 2018 12:47 AM

    Hi,

     

    Have been trying to use the login api, specifically the OTK token endpoint.

     

    I'm able to use the grant_type = client_credentials, however, when trying to use password grant type. I'm having trouble getting a token.

    I've tried the credentials of various (admin, developer) but to no avail.

     

    Anyone able to use the login API OTK token endpoint with password grant type?



  • 2.  Re: API Portal 4.2 : Login API OTK Token Endpoint

    Broadcom Employee
    Posted Feb 08, 2018 07:00 PM

    Dear sharkkae ,

    What's the error you got?

    The OTK authenticate against gateway Internal Identity Provider, ensure you have correct credential.

    How do you build the post request for token endpoint?

    the content-type should be: application/x-www-form-urlencoded

    the body should have following parameters:

    grant_type=password&username=${login}&scope=${scope}&password=${password}

     

    The parameter values should be url encoded.

     

    If you installed the oauth test clients, you can test the password grant-type on https://<your gateway>:8443/oauth/v2/client/ropc 

     

    You may refer to the product document for more details of the paramters,

    OAuth Server API Endpoints - CA API Management OAuth Toolkit - 4.2 - CA Technologies Documentation 

     

    Regards,

    Mark



  • 3.  Re: API Portal 4.2 : Login API OTK Token Endpoint

    Posted Feb 14, 2018 09:37 PM

    Hi Mark,

     

    I'm referring to this Login API

    Login API - CA API Developer Portal - 4.2 - CA Technologies Documentation 

     

    Specifically referring to the auth/oauth/v2.token endpoint, which the default is using grant_type = password.

     

    I'm not able to log into the portal via the Login API. I believe that behind the portal is a gateway, however I'm not able to log into that gateway using policy manager to check its policy implementation.



  • 4.  Re: API Portal 4.2 : Login API OTK Token Endpoint

    Broadcom Employee
    Posted Mar 14, 2019 04:00 AM

    sharkkae Thanks for the response.

     

    I understand, that it is this command that you are trying to run:

    curl 'https://yourportal/login/auth/oauth/v2/token' --data

    'client_id=5a6050112e77410a9ce2276c7c709643&grant_type=password&scope=OOB&username=sell2\test&password=CAdemo123!&login_hint=sell2'

     

    Is that correct?

    What is the error message, that you are receiving?