MIDDAG for Moodle

auth_service_interface

Authentication Service Contract.

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

Table of Contents

Methods

auth_check()  : void
Checks if the user is already logged in.
generate_login_url()  : moodle_url
Generates a login URL with a JWT token.
init()  : void
Initializes the authentication process based on the request token.
redirect()  : void
Redirects the user safely.

Methods

generate_login_url()

Generates a login URL with a JWT token.

public static generate_login_url(stdClass $user[, int $expires = 120 ]) : moodle_url
Parameters
$user : stdClass

Moodle user object

$expires : int = 120

Expiration in seconds

Return values
moodle_url

init()

Initializes the authentication process based on the request token.

public static init() : void

        
On this page

Search results