Table of Contents

Examples

Authorization Request

> curl https://signin.test.purefarming.com/auth/realms/moa/protocol/openid-connect/auth?
       client_id=myclient&
       response_type=code&
       scope=openid%20profile&
       redirect_uri=http://localhost/callback&
       state=abc123&
       code_challenge=xyz098&
       code_challenge_method=plain
Note

The response from this call will be a 301, resulting in a redirect for the user to authenticate. This is intended only as an example of what the URI could look like.

Code Exchange Request

> curl -H Content-Type: application/x-www-form-urlencoded \
       -d grant_type=authorization_code&client_id=<<your client id>>&code=<<returned code>>&redirect_uri=http://localhost/callback&code_verifier=xyz098 \
       https://signin.test.purefarming.com/auth/realms/moa/protocol/openid-connect/token

Client Credentials Request

> curl -H Content-Type: application/x-www-form-urlencoded \
       -d grant_type=client_credentials&client_id=<<your client id>>&client_secret=<<your client secret>>&scope=<<desired scopes>> \
       https://signin.test.purefarming.com/auth/realms/moa/protocol/openid-connect/token