This repository was archived by the owner on Jun 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ <h3>User information</h3>
27
27
</ dl >
28
28
29
29
{% if check_session_iframe is defined %}
30
- < iframe id ="rp_iframe " src =" /session_iframe " hidden > </ iframe >
30
+ < iframe id ="rp_iframe " src ={{ status_check_iframe }} hidden > </ iframe >
31
31
< iframe id ="op_iframe " src ={{ check_session_iframe }} hidden > </ iframe >
32
32
{% endif %}
33
33
Original file line number Diff line number Diff line change 10
10
var client_id = { { client_id } } ;
11
11
var session_state = { { session_state } } ;
12
12
console . log ( "RP session state: " + session_state ) ;
13
- var targetOrigin = { { issuer } } . replace ( / \/ $ / , "" ) ;
13
+ var targetOrigin = new URL ( { { issuer } } ) . origin ;
14
14
15
15
var stat = "unchanged" ;
16
16
var mes = client_id + " " + session_state ;
32
32
}
33
33
stat = e . data ;
34
34
35
- if ( stat == "changed" ) {
35
+ if ( stat === "changed" ) {
36
36
clearInterval ( timer_id ) ;
37
- alert ( "Your session has changed, you will be redirected to log in again." ) ;
38
37
window . parent . window . location = { { session_change_url } } ;
39
38
}
40
39
}
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+
3
+
4
+ < html >
5
+ < head >
6
+ < title > pyoidc RP</ title >
7
+ </ head >
8
+ < body >
9
+
10
+ < h1 > Session verification</ h1 >
11
+ < h2 > Checking that the session hasn't changed!</ h2 >
12
+
13
+ < iframe id ="op_iframe " src ={check_session_iframe} hidden > </ iframe >
14
+ < iframe id ="rp_iframe " src ={status_check_iframe} hidden > </ iframe >
15
+
16
+ </ body >
17
+ </ html >
Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ def finalize(op_hash, request_args):
133
133
}
134
134
except KeyError :
135
135
kwargs = {}
136
+ else :
137
+ kwargs ["status_check_iframe" ] = rp .service_context .add_on ['status_check' ]
136
138
137
139
kwargs ['logout_url' ] = "{}/logout" .format (rp .service_context .base_url )
138
140
@@ -182,14 +184,15 @@ def session_iframe(): # session management
182
184
'session_change_url' : session_change_url
183
185
}
184
186
logger .debug ('rp_iframe args: {}' .format (args ))
185
-
186
- return render_template ('rp_iframe.html' , ** args )
187
+ _template = _rp . service_context . add_on [ "status_check" ][ "session_iframe_template_file" ]
188
+ return render_template (_template , ** args )
187
189
188
190
189
191
@oidc_rp_views .route ('/session_change' )
190
192
def session_change ():
191
193
logger .debug ('session_change: {}' .format (session ['op_hash' ]))
192
194
_rp = get_rp (session ['op_hash' ])
195
+
193
196
# If there is an ID token send it along as a id_token_hint
194
197
_aserv = _rp .service_context .service ['authorization' ]
195
198
request_args = {"prompt" : "none" }
You can’t perform that action at this time.
0 commit comments