ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
◀ ilDoc Overview
MySQLStore.php
Go to the documentation of this file.
1
<?php
2
12
require_once
"Auth/OpenID/SQLStore.php"
;
13
19
class
Auth_OpenID_MySQLStore
extends
Auth_OpenID_SQLStore
{
23
function
setSQL
()
24
{
25
$this->sql[
'nonce_table'
] =
26
"CREATE TABLE %s (\n"
.
27
" server_url VARCHAR(2047) NOT NULL,\n"
.
28
" timestamp INTEGER NOT NULL,\n"
.
29
" salt CHAR(40) NOT NULL,\n"
.
30
" UNIQUE (server_url(255), timestamp, salt)\n"
.
31
") ENGINE=InnoDB"
;
32
33
$this->sql[
'assoc_table'
] =
34
"CREATE TABLE %s (\n"
.
35
" server_url BLOB NOT NULL,\n"
.
36
" handle VARCHAR(255) NOT NULL,\n"
.
37
" secret BLOB NOT NULL,\n"
.
38
" issued INTEGER NOT NULL,\n"
.
39
" lifetime INTEGER NOT NULL,\n"
.
40
" assoc_type VARCHAR(64) NOT NULL,\n"
.
41
" PRIMARY KEY (server_url(255), handle)\n"
.
42
") ENGINE=InnoDB"
;
43
44
$this->sql[
'set_assoc'
] =
45
"REPLACE INTO %s (server_url, handle, secret, issued,\n"
.
46
" lifetime, assoc_type) VALUES (?, ?, !, ?, ?, ?)"
;
47
48
$this->sql[
'get_assocs'
] =
49
"SELECT handle, secret, issued, lifetime, assoc_type FROM %s "
.
50
"WHERE server_url = ?"
;
51
52
$this->sql[
'get_assoc'
] =
53
"SELECT handle, secret, issued, lifetime, assoc_type FROM %s "
.
54
"WHERE server_url = ? AND handle = ?"
;
55
56
$this->sql[
'remove_assoc'
] =
57
"DELETE FROM %s WHERE server_url = ? AND handle = ?"
;
58
59
$this->sql[
'add_nonce'
] =
60
"INSERT INTO %s (server_url, timestamp, salt) VALUES (?, ?, ?)"
;
61
62
$this->sql[
'clean_nonce'
] =
63
"DELETE FROM %s WHERE timestamp < ?"
;
64
65
$this->sql[
'clean_assoc'
] =
66
"DELETE FROM %s WHERE issued + lifetime < ?"
;
67
}
68
72
function
blobEncode
($blob)
73
{
74
return
"0x"
. bin2hex($blob);
75
}
76
}
77
Auth_OpenID_MySQLStore\blobEncode
blobEncode($blob)
private
Definition:
MySQLStore.php:72
Auth_OpenID_MySQLStore\setSQL
setSQL()
private
Definition:
MySQLStore.php:23
Auth_OpenID_MySQLStore
Definition:
MySQLStore.php:19
Auth_OpenID_SQLStore
Definition:
SQLStore.php:57
Services
OpenId
lib
Auth
OpenID
MySQLStore.php
Generated on Wed Aug 27 2025 19:00:58 for ILIAS by
1.8.13 (using
Doxyfile
)