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
auth_check()
Checks if the user is already logged in.
public
static auth_check() : void
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_urlinit()
Initializes the authentication process based on the request token.
public
static init() : void
redirect()
Redirects the user safely.
public
static redirect() : void