Auth_OpenID_Server::openid_associate PHP Method

openid_associate() public method

The callback for 'associate' messages.
public openid_associate ( $request )
    function openid_associate($request)
    {
        $assoc_type = $request->assoc_type;
        $session_type = $request->session->session_type;
        if ($this->negotiator->isAllowed($assoc_type, $session_type)) {
            $assoc = $this->signatory->createAssociation(false, $assoc_type);
            return $request->answer($assoc);
        } else {
            $message = sprintf('Association type %s is not supported with ' . 'session type %s', $assoc_type, $session_type);
            list($preferred_assoc_type, $preferred_session_type) = $this->negotiator->getAllowedType();
            return $request->answerUnsupported($message, $preferred_assoc_type, $preferred_session_type);
        }
    }