Diffusion C API
6.1.5
|
Functions handling authorisation, security and user credentials. More...
Functions | |
CREDENTIALS_T * | credentials_create_none (void) |
Create an empty set of credentials. More... | |
CREDENTIALS_T * | credentials_create_password (const char *password) |
Create credentials for a given password. More... | |
CREDENTIALS_T * | credentials_create_custom (const char *data, const unsigned long len) |
Create custom credentials, where the caller provides an opaque set of bytes. More... | |
void | credentials_free (CREDENTIALS_T *creds) |
Free a credentials structure. More... | |
char * | buf_read_credentials (const char *data, CREDENTIALS_T **credentials) |
Deserialise credentials from a stream of wire format data. More... | |
CREDENTIALS_T * | credentials_unmarshal (const BUF_T *buf) |
Deserialise a credentials structure from a wire format BUF_T. More... | |
BUF_T * | credentials_marshal (const CREDENTIALS_T *credentials) |
Serialise a credentials structure to wire format. More... | |
Functions handling authorisation, security and user credentials.
Copyright © 2014, 2015 Push Technology Ltd., All Rights Reserved.
Use is subject to license terms.
NOTICE: All information contained herein is, and remains the property of Push Technology. The intellectual and technical concepts contained herein are proprietary to Push Technology and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade secret or copyright law.
char* buf_read_credentials | ( | const char * | data, |
CREDENTIALS_T ** | credentials | ||
) |
Deserialise credentials from a stream of wire format data.
data | Pointer the the start of a serialised credentials structure in a char array. |
credentials | A created credentials structure. |
CREDENTIALS_T* credentials_create_custom | ( | const char * | data, |
const unsigned long | len | ||
) |
Create custom credentials, where the caller provides an opaque set of bytes.
data | An array of bytes representing the credentials. |
len | The length of the array. |
CREDENTIALS_T * | Credentials with a type of "CUSTOM". |
NULL | If an error occurs. |
CREDENTIALS_T* credentials_create_none | ( | void | ) |
Create an empty set of credentials.
CREDENTIALS_T * | Credentials with a type of "NONE". |
NULL | If an error occurs. |
CREDENTIALS_T* credentials_create_password | ( | const char * | password | ) |
Create credentials for a given password.
password | The password to encode into the credentials. |
CREDENTIALS_T * | Credentials with a type of "PLAIN_PASSWORD". |
NULL | If an error occurs. |
void credentials_free | ( | CREDENTIALS_T * | creds | ) |
Free a credentials structure.
It is the responsibility of the caller to free any memory associated with the credentials data (either a password or custom data).
creds | A set of credentials. |
BUF_T* credentials_marshal | ( | const CREDENTIALS_T * | credentials | ) |
Serialise a credentials structure to wire format.
credentials | A credentials structure to be serialised. |
BUF_T * | A buffer with the credentials in wire format. |
NULL | If an error occurs. |
CREDENTIALS_T* credentials_unmarshal | ( | const BUF_T * | buf | ) |
Deserialise a credentials structure from a wire format BUF_T.
buf | The buffer containing the serialised credentials. |
CREDENTIALS_T * | A credentials structure. |
NULL | If an error occurs. |