Layer7 API Management

  • 1.  The given grant_type is not supported by the server

    Posted Apr 11, 2018 12:24 AM

    Hi 

    I am using grant type=client_credentials but i get the following error when i debug the code i see there ia s failure on that assertion otk grant type = client credentials

    "error": "unsupported_grant_type",
    "error_description": "The given grant_type is not supported by the server."



  • 2.  Re: The given grant_type is not supported by the server

    Posted Apr 11, 2018 06:00 AM

    Something must be wrong with the request you're sending. Have you tested the Oauth Test clients including client_credentials (https://gateway.domain.com:8443/oauth/v2/client) post installation?

     

    A properly installed oauth toolkit should work with below request.

     



  • 3.  Re: The given grant_type is not supported by the server
    Best Answer

    Broadcom Employee
    Posted Apr 24, 2018 04:21 PM

    First test the Test Clients at https://gateway.domain.com:8443/oauth/v2/client and make sure all the grant types work.

     

    If not working, you still have some post installation steps to perform.

     

    If that works, then try to make the call manually using a REST client for client_credentials grant type.

     

    Request
    Method:POST
    Header:content-type: application/x-www-form-urlencoded
    Header:authorization: Basic base64(client_id:client_secret) (This header can only be used if 'client_id' and 'client_secret' are NOT found within the message body and vice versa!)
    Endpoint:/auth/oauth/v2/token
    Parameters:Parameters: grant_type=client_credentials&client_id=a-client_id&client_secret=a-client_secret&scope=a-list-of-scope-values
    Optional:scope: Only SCOPE values that have been registered for the client will be granted by the OAuth server

     

    OAuth Request Scenarios - CA API Management OAuth Toolkit - 4.2 - CA Technologies Documentation 



  • 4.  Re: The given grant_type is not supported by the server

    Posted Apr 25, 2018 09:26 AM

    Thanks