SReg.php
Simple registration request and response parsing and object representation.
This module contains objects representing simple registration requests and responses that can be used with both OpenID relying parties and OpenID providers.
- The relying party creates a request object and adds it to the object before making the checkid request to the OpenID provider:
$sreg_req = Auth_OpenID_SRegRequest::build(array('email')); $auth_request->addExtension($sreg_req);
- The OpenID provider extracts the simple registration request from the OpenID request using , gets the user's approval and data, creates an object and adds it to the id_res response:
$sreg_req = Auth_OpenID_SRegRequest::fromOpenIDRequest( $checkid_request); // [ get the user's approval and data, informing the user that // the fields in sreg_response were requested ] $sreg_resp = Auth_OpenID_SRegResponse::extractResponse( $sreg_req, $user_data); $sreg_resp->toMessage($openid_response->fields);
$sreg_resp = Auth_OpenID_SRegResponse::fromSuccessResponse( $success_response);
Interfaces, Classes, Traits and Enums
- Auth_OpenID_SRegBase
- A base class for classes dealing with Simple Registration protocol messages.
- Auth_OpenID_SRegRequest
- An object to hold the state of a simple registration request.
- Auth_OpenID_SRegResponse
- Represents the data returned in a simple registration response inside of an OpenID C{id_res} response. This object will be created by the OpenID server, added to the C{id_res} response object, and then extracted from the C{id_res} message by the Consumer.
Table of Contents
- Auth_OpenID_SREG_NS_URI = \Auth_OpenID_SREG_NS_URI_1_1
- Auth_OpenID_SREG_NS_URI_1_0 = 'http://openid.net/sreg/1.0'
- Auth_OpenID_SREG_NS_URI_1_1 = 'http://openid.net/extensions/sreg/1.1'
- Auth_OpenID_checkFieldName() : bool
- Check to see that the given value is a valid simple registration data field name. Return true if so, false if not.
- Auth_OpenID_supportsSReg() : bool
- Does the given endpoint advertise support for simple registration?
Constants
Auth_OpenID_SREG_NS_URI
public
mixed
Auth_OpenID_SREG_NS_URI
= \Auth_OpenID_SREG_NS_URI_1_1
Auth_OpenID_SREG_NS_URI_1_0
public
mixed
Auth_OpenID_SREG_NS_URI_1_0
= 'http://openid.net/sreg/1.0'
Auth_OpenID_SREG_NS_URI_1_1
public
mixed
Auth_OpenID_SREG_NS_URI_1_1
= 'http://openid.net/extensions/sreg/1.1'
Functions
Auth_OpenID_checkFieldName()
Check to see that the given value is a valid simple registration data field name. Return true if so, false if not.
Auth_OpenID_checkFieldName(string $field_name) : bool
Parameters
- $field_name : string
Return values
bool —Auth_OpenID_supportsSReg()
Does the given endpoint advertise support for simple registration?
Auth_OpenID_supportsSReg(Auth_OpenID_ServiceEndpoint $endpoint) : bool
Parameters
- $endpoint : Auth_OpenID_ServiceEndpoint
-
The endpoint object as returned by OpenID discovery. returns whether an sreg type was advertised by the endpoint