authentication-1 - based authentication
#include <rad/client/1/authentication.h> cc [ flag... ] file... -lauthentication1_client [ library... ] interface Session const char * user ; (ro) const char ** roles ; (ro) const char * token ; (rw) rc_err_t authentication_Session__rad_create(rc_instance_t *inst, const char *username, const char *password, const char *scheme, boolean_t preserve, long long timeout, rc_instance_t **result); rc_err_t authentication_Session__rad_delete(rc_instance_t *inst);
AUTHENTICATION-1(3rad) RAD Module Definitions AUTHENTICATION-1(3rad) NAME authentication - API for token-based authentication SYNOPSIS #include <rad/client/1/authentication.h> cc [ flag... ] file... -lauthentication1_client [ library... ] interface Session const char * user ; (ro) const char ** roles ; (ro) const char * token ; (rw) rc_err_t authentication_Session__rad_create(rc_instance_t *inst, const char *username, const char *password, const char *scheme, boolean_t preserve, long long timeout, rc_instance_t **result); rc_err_t authentication_Session__rad_delete(rc_instance_t *inst); DESCRIPTION API com.oracle.solaris.rad.authentication [1] This API provides functions for generating and redeeming security tokens for RAD's token-based Authentication. INTERFACES interface Session Session interface. Represents a session within RAD. Clients should interact with this interface to: - authenticate and obtain access to RAD - retrieve, redeem and revoke UUID authentication tokens - obtain information about existing sessions - delete sessions - obtain session specific data, user, roles. Session Properties const char * user (read-only, nullable) -- gets the username of the connected user rc_err_t authentication_Session_get_user(rc_instance_t *inst, char **result); Get property value. Arguments: inst -- RAD instance result -- Property value returned const char ** roles (read-only) -- gets the list of roles available to the connected user rc_err_t authentication_Session_get_roles(rc_instance_t *inst, char ***result, int *result_cnt); Get property value. Arguments: inst -- RAD instance result -- Property value returned result_cnt -- Number of items in result array const char * token (read-write, nullable) -- Read/Write the session's token. rc_err_t authentication_Session_get_token(rc_instance_t *inst, char **result); Get property value. Arguments: inst -- RAD instance result -- Property value returned rc_err_t authentication_Session_set_token(rc_instance_t *inst, const char *token); Set property value. Arguments: inst -- RAD instance token -- Property value written Session Create rc_err_t authentication_Session__rad_create(rc_instance_t *inst, const char *username, const char *password, const char *scheme, boolean_t preserve, long long timeout, rc_instance_t **result); Create a new Session instance. If authentication data cannot be validated by the server an error is raised. For HTTP clients, a secure token is returned in the HTTP cookie. Arguments: inst -- RAD instance username password scheme -- Sets the authentication scheme. Currently only 'pam' supported. preserve timeout -- Timeout in minutes. If timeout is specified as -1, the default session timeout for this REST interfaces is 60 minutes. result -- New Session instance Session Retrieve rc_err_t authentication_Session__rad_get_name(adr_name_t **result, int n, ...); Obtain RAD name of a Session object. Arguments: result -- RAD name n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t authentication_Session__rad_lookup(rc_conn_t *c, boolean_t strict, rc_instance_t **result, int n, ...); Lookup a Session instance. Construct a RAD name for the interface based on the provided key-value pairs and perform a lookup. If successful, instance reference is returned in the result. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning result -- RAD instance n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key rc_err_t authentication_Session__rad_list(rc_conn_t *c, boolean_t strict, adr_pattern_scheme_t scheme, adr_name_t ***result, int *result_count, int n, ...); List RAD names of a available Session instances. Returns an array and array size of matching object names. Arguments: c -- RAD connection handle strict -- Strict (B_TRUE) or relaxed (B_FALSE) versioning scheme -- Apply glob (NS_GLOB) or regex (NS_REGEX) matching result -- Array of RAD names result_count -- Number of names in result array n -- Number of key-value pairs provided as variadic arguments ... -- Optional key-value pairs that compose the primary key Session Delete rc_err_t authentication_Session__rad_delete(rc_instance_t *inst); Delete and disconnect current session. Arguments: inst -- RAD instance VERSION 1.0 ATTRIBUTES See attributes(7) for descriptions of the following attributes: +--------------------+-----------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------------+ |Availability | system/management/rad | +--------------------+-----------------------+ |Interface Stability | Private | +--------------------+-----------------------+ SEE ALSO rad(8) NOTES 1. Accessing Python documentation for this module: $ pydoc rad.bindings.com.oracle.solaris.rad.authentication_1 Solaris 11.4 2018-09-05 AUTHENTICATION-1(3rad)