IPC-API
Alternatively an application can directly communicate with the oidc-agent through UNIX domain sockets. The socket address can be obtained from the environment variable which is set by the agent (OIDC_SOCK
). The request has to be sent json encoded. We use a UNIX domain socket of type SOCK_STREAM
.
All Clients should ignore additional fields returned in a response from oidc-agent, if the client does not understand these fields. Vice versa oidc-agent ignores fields that it does not understand.
The following fields and values have to be present for the different calls:
Access Token:
Request
Note that one of the fields account
and issuer
has to be present. Use account
to request an access token for a specific account configuration and issuer
when you do not know which account configuration should be used but you do know the issuer for which you want to obtain an access token. Do not provide both of these options in the same request.
Examples
The application example_application
requests an access token for the account configuration iam
. The token should be valid for at least 60 seconds and have the scopes openid profile phone
and the audiences foo
and bar
.
The application example_application
requests an access token for the provider https://example.com/
. There are no guarantees that the token will be valid longer than 0 seconds and it will have all scopes that are available for the used account configuration.
Response
Example:
Error Response
The help message in the info
key is optionally and therefore might be omitted.
Example:
Mytoken:
Request
Example
The application example_application
requests a mytoken for the account configuration iam
. The mytoken should have the AT
capability, it can only be used to obtain 7
access tokens with only the openid profile email
scope and expires after seven days.
Response
Additionally, fields included in the mytoken's server response, such as restrictions
, mytoken_type
are also included.
Example:
Error Response
The help message in the info
key is optionally and therefore might be omitted.
Example:
List of Accounts:
Request
Examples
Response
Example:
Error Response
Example:
Last updated