auth:ticket:integratorguide
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| auth:ticket:integratorguide [2017/02/25 13:03] – [Ticket API] admin | auth:ticket:integratorguide [2025/12/10 16:16] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ===== Integrator Guide ===== | + | ===== Ticket based authentication |
| - | ===== Auth Ticket | + | =====Ticket Direct |
| + | |||
| + | ====Introduction==== | ||
| This guide is provided for : | This guide is provided for : | ||
| Ligne 10: | Ligne 12: | ||
| This plugin provides the way to some other plugins to send pre-authenticated tickets to users. This addresses a set of security considerations : | This plugin provides the way to some other plugins to send pre-authenticated tickets to users. This addresses a set of security considerations : | ||
| + | |||
| + | === Ticket encryption methods === | ||
| + | |||
| + | This component provides either DES or RSA encryption methods to encode/ | ||
| + | |||
| + | * DES (AES) uses internal Mysql/Maria DB AES_ENCRYP/ | ||
| + | * RSA is a more compatible method based on openssl underlying layer. Moodle needs have MNET network enabled and a valid local keypair available. The key length should be of 2048 bytes to ensure the ticket payload has sufficiant length to hold the targer urls. Openssl functions claim about length restrictions of the input payload when using 1024 rsa key length. (See http:// | ||
| === Ticket validity time === | === Ticket validity time === | ||
| Ligne 30: | Ligne 39: | ||
| ==== Ticket API ==== | ==== Ticket API ==== | ||
| - | The ticket API is contained in the lib.php. | + | The ticket API is contained in the lib.php. The actual API offers four functions. The former pair are high level notification sending functions using tickets. The latter are low encode/ |
| === function ticket_notify($recipient, | === function ticket_notify($recipient, | ||
| Ligne 39: | Ligne 48: | ||
| Only recipients that have a valid Moodle account can use an access tickets. The ticket is only valid on the given return URL and cannot be used for going to another location, unless user's profile other mention. | Only recipients that have a valid Moodle account can use an access tickets. The ticket is only valid on the given return URL and cannot be used for going to another location, unless user's profile other mention. | ||
| - | * @param object $recipient | + | |
| - | * @param object $sender | + | |
| - | * @param string $title mail subject | + | |
| - | * @param string $notification raw content of the mail | + | |
| - | * @param string $notification_html html content of the mail | + | |
| - | * @param string $url return url of the ticket | + | |
| - | * @param string $purpose some textual comment on what the ticket was for | + | |
| - | * @param bool $term the ticket validity duration, may be ' | + | |
| + | |||
| + | === function ticket_notifyrole($roleid, | ||
| + | |||
| + | Send a notification message to all users having the role in the given context. | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | === function ticket_generate($user, | ||
| + | |||
| + | Generates a direct access ticket for this user. | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | === function ticket_decode($encrypted, | ||
| + | |||
| + | Decodes a direct access ticket for this user. | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | < | ||
| + | ---- | ||
| + | ====Credits==== | ||
| + | * Valéry Frémaux (valery@activeprolearn.com)) Developments, | ||
| + | * Florence Labord (florence@activeprolearn.com) Documentation | ||
| + | [[auth: | ||
| + | < | ||
auth/ticket/integratorguide.1488027816.txt.gz · Dernière modification : (modification externe)
