Top | ![]() |
![]() |
![]() |
![]() |
A GstRTSPToken contains the permissions and roles of the user performing the current request. A token is usually created when a user is authenticated by the GstRTSPAuth object and is then placed as the current token for the current request.
GstRTSPAuth can use the token and its contents to check authorization for various operations by comparing the token to the GstRTSPPermissions of the object.
The accepted values of the token are entirely defined by the GstRTSPAuth object that implements the security policy.
Last reviewed on 2013-07-15 (1.0.0)
GstRTSPToken *
gst_rtsp_token_new_empty (void
);
Create a new empty Authorization token.
GstRTSPToken * gst_rtsp_token_new (const gchar *firstfield
,...
);
Create a new Authorization token with the given fieldnames and values.
Arguments are given similar to gst_structure_new()
.
GstRTSPToken * gst_rtsp_token_new_valist (const gchar *firstfield
,va_list var_args
);
Create a new Authorization token with the given fieldnames and values.
Arguments are given similar to gst_structure_new_valist()
.
GstRTSPToken *
gst_rtsp_token_ref (GstRTSPToken *token
);
Increase the refcount of this token.
void
gst_rtsp_token_unref (GstRTSPToken *token
);
Decrease the refcount of an token, freeing it if the refcount reaches 0.
const GstStructure *
gst_rtsp_token_get_structure (GstRTSPToken *token
);
Access the structure of the token.
GstStructure *
gst_rtsp_token_writable_structure (GstRTSPToken *token
);
Get a writable version of the structure.
The structure of the token. The structure is still
owned by the token, which means that you should not free it and that the
pointer becomes invalid when you free the token. This function checks if
token
is writable and will never return NULL
.
MT safe.
[transfer none]
const gchar * gst_rtsp_token_get_string (GstRTSPToken *token
,const gchar *field
);
Get the string value of field
in token
.
the string value of field
in
token
or NULL
when field
is not defined in token
. The string
becomes invalid when you free token
.
[transfer none][nullable]
gboolean gst_rtsp_token_is_allowed (GstRTSPToken *token
,const gchar *field
);
Check if token
has a boolean field
and if it is set to TRUE
.