Subversion Repositories wimsdev

Rev

Rev 8429 | Rev 12191 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8429 Rev 12190
Line 12... Line 12...
12
$ in $module_init_parm
12
$ in $module_init_parm
13
module_init_parm=!replace &ticket=.* by in $module_init_parm
13
module_init_parm=!replace &ticket=.* by in $module_init_parm
14
type= !getopt type in $ticket
14
type= !getopt type in $ticket
15
ticket = !getopt ticket in $ticket
15
ticket = !getopt ticket in $ticket
16
!if $ticket != $empty
16
!if $ticket != $empty
17
   url = $wims_ref_name?module=adm/class/classes&$module_init_parm
17
  url = $wims_ref_name?module=adm/class/classes&$module_init_parm
18
   !read adm/codeurl $url
18
  !read adm/codeurl $url
19
   !!response = !exec webget $cas_auth/validate?ticket=$ticket&service=$script_out
19
  !!response = !exec webget $cas_auth/validate?ticket=$ticket&service=$script_out
20
   tmpdir=$wims_home/tmp/sessions/$wims_session
20
  tmpdir=$wims_home/tmp/sessions/$wims_session
21
   response=!sh export wims_exec_parm="$cas_auth/validate?ticket=$ticket&service=$script_out" ;\
21
  response=!sh export wims_exec_parm="$cas_auth/validate?ticket=$ticket&service=$script_out" ;\
22
      bin/webget > $tmpdir/getcas ; gunzip -c -f $tmpdir/getcas
22
      bin/webget > $tmpdir/getcas ; gunzip -c -f $tmpdir/getcas
23
   test2 = !line 1 of $response
23
  test2 = !line 1 of $response
24
   !if $test2 = yes
24
  !if $test2 = yes
25
      auth_user=!line 2 of $response
25
    auth_user=!line 2 of $response
26
      auth_user=!lowercase $auth_user
26
    auth_user=!lowercase $auth_user
27
      auth_test=OK
27
    auth_test=OK
28
   !else
28
  !else
29
      !if authenticationFailure notin $response
29
    !if authenticationFailure notin $response
30
!!! answer to serviceValidate (xml)
30
!!! answer to serviceValidate (xml)
31
        !set auth_user=!detag $response
31
    !set auth_user=!detag $response
32
        !set auth_user=!nonempty lines $auth_user
32
      !set auth_user=!nonempty lines $auth_user
33
        !set auth_user=!line 1 of  $auth_user
33
      !set auth_user=!line 1 of  $auth_user
34
        !set auth_user=!nospace $auth_user
34
      !set auth_user=!nospace $auth_user
35
        !set auth_user=!lowercase $auth_user
35
      !set auth_user=!lowercase $auth_user
36
        !set auth_test=OK
36
      !set auth_test=OK
37
      !else
37
    !else
38
        error=bad_cas_connexion
38
      error=bad_cas_connexion
39
        !exit
39
      !exit
40
      !endif
40
    !endif
41
   !endif
41
  !endif
42
!endif
42
!endif
43
auth_user_orig=$auth_user
43
auth_user_orig=$auth_user
44
auth_error=$wims_exec_error
44
auth_error=$wims_exec_error
45
wims_exec_error=
45
wims_exec_error=