AgsSecurityContext

AgsSecurityContext — current security context

Stability Level

Stable, unless otherwise indicated

Functions

Properties

char * certs Read / Write

Types and Values

Object Hierarchy

    GFlags
    ╰── AgsSecurityContextMode
    GObject
    ╰── AgsSecurityContext
        ╰── AgsAuthSecurityContext

Includes

#include <ags/server/security/ags_security_context.h>

Description

The AgsSecurityContext is an object to track active server contices.

Functions

AGS_SECURITY_CONTEXT_GET_OBJ_MUTEX()

#define AGS_SECURITY_CONTEXT_GET_OBJ_MUTEX(obj) (&(((AgsSecurityContext *) obj)->obj_mutex))

ags_security_context_parse_business_group ()

void
ags_security_context_parse_business_group
                               (AgsSecurityContext *security_context,
                                xmlDoc *xml_doc,
                                gchar *user_uuid);

Parse business_group and apply to security_context .

Parameters

security_context

the AgsSecurityContext

 

xml_doc

the xmlDoc containing groups

 

user_uuid

the user's UUID

 

Since: 3.0.0


ags_security_context_get_business_group ()

gchar **
ags_security_context_get_business_group
                               (AgsSecurityContext *security_context);

Get business group of security_context .

Parameters

security_context

the AgsSecurityContext

 

Returns

the string vector containing business group or NULL.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.0.0


ags_security_context_add_server_context ()

void
ags_security_context_add_server_context
                               (AgsSecurityContext *security_context,
                                gchar *server_context);

Add server_context to security_context .

Parameters

security_context

the AgsSecurityContext

 

server_context

the server context

 

Since: 3.0.0


ags_security_context_remove_server_context ()

gboolean
ags_security_context_remove_server_context
                               (AgsSecurityContext *security_context,
                                gchar *server_context);

Remove server_context from security_context .

Parameters

security_context

the AgsSecurityContext

 

server_context

the server context

 

Returns

TRUE on success, otherwise FALSE

Since: 3.0.0


ags_security_context_get_server_context ()

gchar **
ags_security_context_get_server_context
                               (AgsSecurityContext *security_context);

Get business group of security_context .

Parameters

security_context

the AgsSecurityContext

 

Returns

the string vector containing business group or NULL.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.0.0


ags_security_context_new ()

AgsSecurityContext *
ags_security_context_new ();

Create AgsSecurityContext.

Returns

the new AgsSecurityContext instance

Since: 3.0.0

Types and Values

enum AgsSecurityContextMode

The AgsSecurityContextMode specifies basic account permissions.

Members

AGS_SECURITY_CONTEXT_RPC_READ

allowed to read using RPC

 

AGS_SECURITY_CONTEXT_RPC_WRITE

allowed to write using RPC

 

AGS_SECURITY_CONTEXT_RPC_EXECUTE

allowed to execute using RPC

 

AGS_SECURITY_CONTEXT_ACCOUNT_READ

allowed to read account information

 

AGS_SECURITY_CONTEXT_ACCOUNT_WRITE

allowed to write account information

 

Property Details

The “certs” property

  “certs”                    char *

The assigned certificates as string.

Owner: AgsSecurityContext

Flags: Read / Write

Default value: NULL

Since: 3.0.0