Client Credentials Flow

The client can request an access token using only its client credentials (or other supported means of authentication) when the client is requesting access to the protected resources under its control, or those of another resource owner that have been previously arranged with the authorization server (the method of which is beyond the scope of this specification).

More info

How to Use in Java

1) Create App in Cidaas

To work with Authorization code flow we need to create Non Interactive Client in cidaas app section

2) Get Access Token

        String appID = "your client";
        String secret = "your secret";        

        OAuthClientRequest clientReqAccessToken = OAuthClientRequest

        OAuthClient oAuthClient = new OAuthClient(new URLConnectionClient());
        OAuthAccessTokenResponse oAuthResponse = oAuthClient.accessToken(clientReqAccessToken);

                "Access Token: " + oAuthResponse.getAccessToken() + ", Expires in: " + oAuthResponse.getBody());


  "access_token": "ey...",
  "userstate": "UNKNOWN",
  "scope": "scope",
  "expires_in": 86400

results matching ""

    No results matching ""