nm_iam_authorize_connection()

DESCRIPTION

Authorize a NabtoDeviceConnectionRef as a specified user.

This can be used if the application has authorized a connection eg. using Oauth.

DECLARATION

enum nm_iam_error nm_iam_authorize_connection(struct nm_iam* iam, NabtoDeviceConnectionRef ref, const char* username)

PARAMETERS

iam:
[in] IAM module to manipulate
ref:
[in] Connection ref to authorize
username:
[in] The username to authorize the connection as

RETURNS

  • NM_IAM_ERROR_OK: if the connection was authorized
  • NM_IAM_ERROR_NO_SUCH_USER: if the specified user does not exist.