Auth_OpenID_AssociateRequest::answerUnsupported PHP Method

answerUnsupported() public method

public answerUnsupported ( $text_message, $preferred_association_type = null, $preferred_session_type = null )
    function answerUnsupported($text_message, $preferred_association_type = null, $preferred_session_type = null)
    {
        if ($this->message->isOpenID1()) {
            return new Auth_OpenID_ServerError($this->message);
        }
        $response = new Auth_OpenID_ServerResponse($this);
        $response->fields->setArg(Auth_OpenID_OPENID_NS, 'error_code', 'unsupported-type');
        $response->fields->setArg(Auth_OpenID_OPENID_NS, 'error', $text_message);
        if ($preferred_association_type) {
            $response->fields->setArg(Auth_OpenID_OPENID_NS, 'assoc_type', $preferred_association_type);
        }
        if ($preferred_session_type) {
            $response->fields->setArg(Auth_OpenID_OPENID_NS, 'session_type', $preferred_session_type);
        }
        $response->code = AUTH_OPENID_HTTP_ERROR;
        return $response;
    }