interface auth_service_interface

Authentication Service Contract.

Defines methods for handling JWT authentication, session management, and secure redirects.

Methods

static void
init()

Initializes the authentication process based on the request token.

static void
auth_check()

Checks if the user is already logged in.

static moodle_url
generate_login_url(stdClass $user, int $expires = 120)

Generates a login URL with a JWT token.

static void
redirect()

Redirects the user safely.

Details

at line 34
static void init()

Initializes the authentication process based on the request token.

Return Value

void

at line 39
static void auth_check()

Checks if the user is already logged in.

Return Value

void

at line 49
static moodle_url generate_login_url(stdClass $user, int $expires = 120)

Generates a login URL with a JWT token.

Parameters

stdClass $user

Moodle user object

int $expires

Expiration in seconds

Return Value

moodle_url

at line 54
static void redirect()

Redirects the user safely.

Return Value

void