equal
deleted
inserted
replaced
97 $pubkey = $session->rijndael_genkey(); |
97 $pubkey = $session->rijndael_genkey(); |
98 $challenge = $session->dss_rand(); |
98 $challenge = $session->dss_rand(); |
99 |
99 |
100 if ( isset($_GET['act']) && $_GET['act'] == 'getkey' ) |
100 if ( isset($_GET['act']) && $_GET['act'] == 'getkey' ) |
101 { |
101 { |
|
102 $username = ( $session->user_logged_in ) ? $session->username : false; |
102 $response = Array( |
103 $response = Array( |
|
104 'username' => $username, |
103 'key' => $pubkey, |
105 'key' => $pubkey, |
104 'challenge' => $challenge |
106 'challenge' => $challenge |
105 ); |
107 ); |
106 $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); |
108 $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); |
107 $response = $json->encode($response); |
109 $response = $json->encode($response); |