IBMCloud v0.0.1 IBMCloud.IAM.OAuth2 View Source

OAuth2 interfaces to IAM.

Link to this section Summary

Link to this section Functions

Link to this function

build_client(auth \\ [], endpoint \\ "https://iam.cloud.ibm.com", adapter \\ nil)

View Source
Link to this function

create_token(client, body \\ [], opts \\ [])

View Source

Creates a token.

API Key

  • :apikey
{:ok, %{status: 200, body: %{"access_token" => bearer_token}}} =
  IBMCloud.IAM.OAuth2.build_client()
  |> IBMCloud.IAM.OAuth2.create_token(apikey: apikey)

Create an IAM access token for a user or service ID

Authorization Code

  • :code

Step 4. Developing an authentication flow