session_test.routing.yml 4.63 KB
Newer Older
1
session_test.get:
2
  path: '/session-test/get'
3
4
  defaults:
    _title: 'Session value'
5
    _controller: '\Drupal\session_test\Controller\SessionTestController::get'
6
7
  options:
    no_cache: TRUE
8
  requirements:
9
    _access: 'TRUE'
10
11
12
13
14
session_test.get_from_session_object:
  path: '/session-test/get-from-session-object'
  defaults:
    _title: 'Session value'
    _controller: '\Drupal\session_test\Controller\SessionTestController::getFromSessionObject'
15
16
  options:
    no_cache: TRUE
17
18
  requirements:
    _access: 'TRUE'
19
session_test.id:
20
  path: '/session-test/id'
21
22
  defaults:
    _title: 'Session ID'
23
    _controller: '\Drupal\session_test\Controller\SessionTestController::getId'
24
25
  options:
    no_cache: TRUE
26
  requirements:
27
    _access: 'TRUE'
28

29
session_test.id_from_cookie:
30
  path: '/session-test/id-from-cookie'
31
32
  defaults:
    _title: 'Session ID from cookie'
33
    _controller: '\Drupal\session_test\Controller\SessionTestController::getIdFromCookie'
34
  requirements:
35
    _access: 'TRUE'
36

37
session_test.set:
38
  path: '/session-test/set/{test_value}'
39
40
  defaults:
    _title: 'Set session value'
41
    _controller: '\Drupal\session_test\Controller\SessionTestController::set'
42
  options:
43
    no_cache: TRUE
44
45
46
    converters:
      test_value: '\s+'
  requirements:
47
    _access: 'TRUE'
48

49
session_test.no_set:
50
  path: '/session-test/no-set/{test_value}'
51
52
  defaults:
    _title: 'Set session value but do not save session'
53
    _controller: '\Drupal\session_test\Controller\SessionTestController::noSet'
54
  options:
55
    no_cache: TRUE
56
57
58
    converters:
      test_value: '\s+'
  requirements:
59
    _access: 'TRUE'
60

61
session_test.set_message:
62
  path: '/session-test/set-message'
63
64
  defaults:
    _title: 'Set message'
65
    _controller: '\Drupal\session_test\Controller\SessionTestController::setMessage'
66
  requirements:
67
    _access: 'TRUE'
68

69
70
session_test.set_message_but_do_not_save:
  path: '/session-test/set-message-but-do-not-save'
71
72
  defaults:
    _title: 'Set message but do not save session'
73
    _controller: '\Drupal\session_test\Controller\SessionTestController::setMessageButDoNotSave'
74
  requirements:
75
    _access: 'TRUE'
76

77
session_test.is_logged_in:
78
  path: '/session-test/is-logged-in'
79
80
  defaults:
    _title: 'Check if user is logged in'
81
    _controller: '\Drupal\session_test\Controller\SessionTestController::isLoggedIn'
82
83
  requirements:
    _user_is_logged_in: 'TRUE'
84
85
86
87
88
89
90
91

session_test.form:
  path: '/session-test/form'
  defaults:
    _form: '\Drupal\session_test\Form\SessionTestForm'
    _title: 'Test form'
  requirements:
    _access: 'TRUE'
92
93
94
95
96
97
98
99

session_test.trace_handler:
  path: '/session-test/trace-handler'
  defaults:
    _title: 'Returns the trace recorded by test proxy session handlers as JSON'
    _controller: '\Drupal\session_test\Controller\SessionTestController::traceHandler'
  requirements:
    _access: 'TRUE'
100
101
102
103
104
105
106

session_test.get_session_basic_auth:
  path: '/session-test/get-session'
  defaults:
    _title: 'Get session information using basic authentication'
    _controller: '\Drupal\session_test\Controller\SessionTestController::getSession'
  options:
107
    no_cache: TRUE
108
109
110
111
112
113
114
115
116
    _auth: ['basic_auth']
  requirements:
    _permission: 'administer site configuration'

session_test.get_session_no_auth:
  path: '/session-test/get-session-no-auth'
  defaults:
    _title: 'Get session information'
    _controller: '\Drupal\session_test\Controller\SessionTestController::getSession'
117
118
  options:
    no_cache: TRUE
119
120
  requirements:
    _access: 'TRUE'
121
122
123
124
125
126
127

session_test.set_session:
  path: '/session-test/set-session/{test_value}'
  defaults:
    _title: 'Set a session value using basic authentication'
    _controller: '\Drupal\session_test\Controller\SessionTestController::setSession'
  options:
128
    no_cache: TRUE
129
130
131
132
133
    _auth: ['basic_auth']
    converters:
      test_value: '\s+'
  requirements:
    _permission: 'administer site configuration'
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

session_test.set_bag_flag:
  path: '/session-test/set-bag-flag'
  defaults:
    _title: 'Sets the test flag in the session test bag'
    _controller: '\Drupal\session_test\Controller\SessionTestController::setSessionBagFlag'
  options:
    no_cache: TRUE
  requirements:
    _access: 'TRUE'

session_test.clear_bag_flag:
  path: '/session-test/clear-bag-flag'
  defaults:
    _title: 'Clears the test flag in the session test bag'
    _controller: '\Drupal\session_test\Controller\SessionTestController::clearSessionBagFlag'
  options:
    no_cache: TRUE
  requirements:
    _access: 'TRUE'

session_test.has_bag_flag:
  path: '/session-test/has-bag-flag'
  defaults:
    _title: 'Prints a message if the flag in the session bag is set'
    _controller: '\Drupal\session_test\Controller\SessionTestController::hasSessionBagFlag'
  options:
    no_cache: TRUE
  requirements:
    _access: 'TRUE'