GstRTSPAuth

GstRTSPAuth

Synopsis

                    GstRTSPAuth;
                    GstRTSPAuthClass;
GstRTSPAuth *       gst_rtsp_auth_new                   (void);
void                gst_rtsp_auth_set_basic             (GstRTSPAuth *auth,
                                                         const gchar *basic);
gboolean            gst_rtsp_auth_setup_auth            (GstRTSPAuth *auth,
                                                         GstRTSPClient *client,
                                                         GQuark hint,
                                                         GstRTSPClientState *state);
gboolean            gst_rtsp_auth_check_method          (GstRTSPAuth *auth,
                                                         GstRTSPClient *client,
                                                         GQuark hint,
                                                         GstRTSPClientState *state);
gchar *             gst_rtsp_auth_make_basic            (const gchar *user,
                                                         const gchar *pass);

Object Hierarchy

  GObject
   +----GstRTSPAuth

Description

Details

GstRTSPAuth

typedef struct _GstRTSPAuth GstRTSPAuth;

The authentication structure.


GstRTSPAuthClass

typedef struct {
  GObjectClass  parent_class;

  gboolean (*setup_auth)   (GstRTSPAuth *auth, GstRTSPClient * client,
                            GQuark hint, GstRTSPClientState *state);
  gboolean (*check_method) (GstRTSPAuth *auth, GstRTSPClient * client,
                            GQuark hint, GstRTSPClientState *state);
} GstRTSPAuthClass;

gst_rtsp_auth_new ()

GstRTSPAuth *       gst_rtsp_auth_new                   (void);

Create a new GstRTSPAuth instance.

Returns :

a new GstRTSPAuth

gst_rtsp_auth_set_basic ()

void                gst_rtsp_auth_set_basic             (GstRTSPAuth *auth,
                                                         const gchar *basic);

Set the basic token for the default authentication algorithm.

auth :

a GstRTSPAuth

basic :

the basic token

gst_rtsp_auth_setup_auth ()

gboolean            gst_rtsp_auth_setup_auth            (GstRTSPAuth *auth,
                                                         GstRTSPClient *client,
                                                         GQuark hint,
                                                         GstRTSPClientState *state);

Add authentication tokens to response.

auth :

a GstRTSPAuth

client :

the client

uri :

the requested uri

session :

the session

request :

the request

response :

the response

Returns :

FALSE if something is wrong.

gst_rtsp_auth_check_method ()

gboolean            gst_rtsp_auth_check_method          (GstRTSPAuth *auth,
                                                         GstRTSPClient *client,
                                                         GQuark hint,
                                                         GstRTSPClientState *state);

Check if client is allowed to perform the actions of state.

auth :

a GstRTSPAuth

client :

the client

hint :

a hint

state :

client state

Returns :

FALSE if the action is not allowed.

gst_rtsp_auth_make_basic ()

gchar *             gst_rtsp_auth_make_basic            (const gchar *user,
                                                         const gchar *pass);

Construct a Basic authorisation token from user and pass.

user :

a userid

pass :

a password

Returns :

the base64 encoding of the string user:pass. g_free() after usage.