function putAuthAttributes()
    {
        if (isset($this->username)) {
            $this->putAttribute(RADIUS_USER_NAME, $this->username);
        }
        if (isset($this->response) && isset($this->peerChallenge)) {
            // Response: chapid, flags (1 = use NT Response), Peer challenge, reserved, Response
            $resp = pack('CCa16a8a24',$this->chapid , 1, $this->peerChallenge, str_repeat("\0", 8), $this->response);
            $this->putVendorAttribute(RADIUS_VENDOR_MICROSOFT, RADIUS_MICROSOFT_MS_CHAP2_RESPONSE, $resp);
        }
        if (isset($this->challenge)) {
            $this->putVendorAttribute(RADIUS_VENDOR_MICROSOFT, RADIUS_MICROSOFT_MS_CHAP_CHALLENGE, $this->challenge);
        }
    }
function putAuthAttributes()
    {
        if (isset($this->username)) {
            $this->putAttribute(RADIUS_USER_NAME, $this->username);
        }
        if (isset($this->response) && isset($this->peerChallenge)) {
            // Response: chapid, flags (1 = use NT Response), Peer challenge, reserved, Response
            $resp = pack('CCa16a8a24',$this->chapid , 1, $this->peerChallenge, str_repeat("\0", 8), $this->response);
            $this->putVendorAttribute(RADIUS_VENDOR_MICROSOFT, RADIUS_MICROSOFT_MS_CHAP2_RESPONSE, $resp);
        }
        if (isset($this->challenge)) {
            $this->putVendorAttribute(RADIUS_VENDOR_MICROSOFT, RADIUS_MICROSOFT_MS_CHAP_CHALLENGE, $this->challenge);
        }
    }
function putAuthAttributes ( ) { if ( isset ( $ this -> username ) ) { $ this -> putAttribute ( RADIUS_USER_NAME , $ this -> username ) ; } if ( isset ( $ this -> response ) && isset ( $ this -> peerChallenge ) ) { // Response: chapid, flags (1 = use NT Response), Peer challenge, reserved, Response $ resp = pack ( 'CCa16a8a24' , $ this -> chapid , 1 , $ this -> peerChallenge , str_repeat ( "\0" , 8 ) , $ this -> response ) ; $ this -> putVendorAttribute ( RADIUS_VENDOR_MICROSOFT , RADIUS_MICROSOFT_MS_CHAP2_RESPONSE , $ resp ) ; } if ( isset ( $ this -> challenge ) ) { $ this -> putVendorAttribute ( RADIUS_VENDOR_MICROSOFT , RADIUS_MICROSOFT_MS_CHAP_CHALLENGE , $ this -> challenge ) ; } }
Put MS-CHAPv2 specific attributes

For authenticating using MS-CHAPv1 via RADIUS you have to put the challenge
and the response. The response has this structure:
struct rad_mschapv2value {
u_char ident;
u_char flags;
u_char pchallenge[16];
u_char reserved[8];
u_char response[24];
};
where pchallenge is the peer challenge. Like for MS-CHAPv1 we set the flags field to 1.
@return void
Put MS - CHAPv2 specific attributes