PHP Class Auth_OpenID_SessionNegotiator
You can create and use negotiators if you:
- Do not want to do Diffie-Hellman key exchange because you use
transport-layer encryption (e.g. SSL)
- Want to use only SHA-256 associations
- Do not want to support plain-text associations over a non-secure
channel
It is up to you to set a policy for what kinds of associations to
accept. By default, the library will make any kind of association
that is allowed in the OpenID 2.0 specification.
Use of negotiators in the library
=================================
When a consumer makes an association request, it calls {@link getAllowedType} to get the preferred association type and
association session type.
The server gets a request for a particular association/session type
and calls {@link isAllowed} to determine if it should create an
association. If it is supported, negotiation is complete. If it is
not, the server calls {@link getAllowedType} to get an allowed
association type to return to the consumer.
If the consumer gets an error response indicating that the
requested association/session type is not supported by the server
that contains an assocation/session type to try, it calls {@link isAllowed} to determine if it should try again with the given
combination of association/session type.
Mostrar archivo
Open project: openid/php-openid
Public Methods
Method |
Description |
|
__construct ( $allowed_types ) |
|
|
addAllowedType ( $assoc_type, $session_type = null ) |
Add an association type and session type to the allowed types
list. The assocation/session pairs are tried in the order that
they are added. |
|
getAllowedType ( ) |
Get a pair of assocation type and session type that are
supported. |
|
isAllowed ( $assoc_type, $session_type ) |
Is this combination of association type and session type allowed? |
|
setAllowedTypes ( $allowed_types ) |
Set the allowed association types, checking to make sure each
combination is valid. |
|
Method Details
__construct()
public method
addAllowedType()
public method
Add an association type and session type to the allowed types
list. The assocation/session pairs are tried in the order that
they are added.
getAllowedType()
public method
Get a pair of assocation type and session type that are
supported.
isAllowed()
public method
Is this combination of association type and session type allowed?
public isAllowed ( $assoc_type, $session_type ) |
setAllowedTypes()
public method
Set the allowed association types, checking to make sure each
combination is valid.