PHP Class SAML2\AuthnRequest

Inheritance: extends Request
Afficher le fichier Open project: simplesamlphp/saml2 Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( DOMElement $xml = null ) Constructor for SAML 2 authentication request messages.
decryptNameId ( XMLSecurityKey $key, array $blacklist = [] ) Decrypt the NameId of the subject in the assertion.
encryptNameId ( XMLSecurityKey $key ) Encrypt the NameID in the AuthnRequest.
getAssertionConsumerServiceIndex ( ) : integer | null Retrieve the value of the AssertionConsumerServiceIndex attribute.
getAssertionConsumerServiceURL ( ) : string | null Retrieve the value of the AssertionConsumerServiceURL attribute.
getAttributeConsumingServiceIndex ( ) : integer | null Retrieve the value of the AttributeConsumingServiceIndex attribute.
getForceAuthn ( ) : boolean Retrieve the value of the ForceAuthn attribute.
getIDPList ( ) : array This function retrieves the list of providerIDs from this authentication request.
getIsPassive ( ) : boolean Retrieve the value of the IsPassive attribute.
getNameId ( ) : array | null Retrieve the NameId of the subject in the assertion.
getNameIdPolicy ( ) : array Retrieve the NameIdPolicy.
getProtocolBinding ( ) : string | null Retrieve the value of the ProtocolBinding attribute.
getProviderName ( ) : string Retrieve the value of the ProviderName attribute.
getProxyCount ( ) : integer
getRequestedAuthnContext ( ) : array | null Retrieve the RequestedAuthnContext.
getRequesterID ( ) : array
getSubjectConfirmation ( ) : SAML2\XML\saml\SubjectConfirmation[] Retrieve the SubjectConfirmation elements we have in our Subject element.
setAssertionConsumerServiceIndex ( integer | null $assertionConsumerServiceIndex ) Set the value of the AssertionConsumerServiceIndex attribute.
setAssertionConsumerServiceURL ( string | null $assertionConsumerServiceURL ) Set the value of the AssertionConsumerServiceURL attribute.
setAttributeConsumingServiceIndex ( integer | null $attributeConsumingServiceIndex ) Set the value of the AttributeConsumingServiceIndex attribute.
setForceAuthn ( boolean $forceAuthn ) Set the value of the ForceAuthn attribute.
setIDPList ( $IDPList ) This function sets the scoping for the request.
setIsPassive ( boolean $isPassive ) Set the value of the IsPassive attribute.
setNameId ( array | null $nameId ) Set the NameId of the subject in the assertion.
setNameIdPolicy ( array $nameIdPolicy ) Set the NameIDPolicy.
setProtocolBinding ( string $protocolBinding ) Set the value of the ProtocolBinding attribute.
setProviderName ( string $ProviderName ) Set the value of the ProviderName attribute.
setProxyCount ( integer $ProxyCount )
setRequestedAuthnContext ( array | null $requestedAuthnContext ) Set the RequestedAuthnContext.
setRequesterID ( array $RequesterID )
setSubjectConfirmation ( array $subjectConfirmation ) Set the SubjectConfirmation elements that should be included in the assertion.
toUnsignedXML ( ) : DOMElement Convert this authentication request to an XML element.

Méthodes protégées

Méthode Description
parseNameIdPolicy ( DOMElement $xml )
parseRequestedAuthnContext ( DOMElement $xml )
parseScoping ( DOMElement $xml )

Private Methods

Méthode Description
addSubject ( DOMElement $root ) Add a Subject-node to the assertion.
parseSubject ( DOMElement $xml )

Method Details

__construct() public méthode

Constructor for SAML 2 authentication request messages.
public __construct ( DOMElement $xml = null )
$xml DOMElement The input message.

decryptNameId() public méthode

Decrypt the NameId of the subject in the assertion.
public decryptNameId ( XMLSecurityKey $key, array $blacklist = [] )
$key RobRichards\XMLSecLibs\XMLSecurityKey The decryption key.
$blacklist array Blacklisted decryption algorithms.

encryptNameId() public méthode

Encrypt the NameID in the AuthnRequest.
public encryptNameId ( XMLSecurityKey $key )
$key RobRichards\XMLSecLibs\XMLSecurityKey The encryption key.

getAssertionConsumerServiceIndex() public méthode

Retrieve the value of the AssertionConsumerServiceIndex attribute.
public getAssertionConsumerServiceIndex ( ) : integer | null
Résultat integer | null The AssertionConsumerServiceIndex attribute.

getAssertionConsumerServiceURL() public méthode

Retrieve the value of the AssertionConsumerServiceURL attribute.
public getAssertionConsumerServiceURL ( ) : string | null
Résultat string | null The AssertionConsumerServiceURL attribute.

getAttributeConsumingServiceIndex() public méthode

Retrieve the value of the AttributeConsumingServiceIndex attribute.
public getAttributeConsumingServiceIndex ( ) : integer | null
Résultat integer | null The AttributeConsumingServiceIndex attribute.

getForceAuthn() public méthode

Retrieve the value of the ForceAuthn attribute.
public getForceAuthn ( ) : boolean
Résultat boolean The ForceAuthn attribute.

getIDPList() public méthode

Currently we only support a list of ipd ientity id's.
public getIDPList ( ) : array
Résultat array List of idp EntityIDs from the request

getIsPassive() public méthode

Retrieve the value of the IsPassive attribute.
public getIsPassive ( ) : boolean
Résultat boolean The IsPassive attribute.

getNameId() public méthode

The returned NameId is in the format used by \SAML2\Utils::addNameId().
See also: SAML2\Utils::addNameId()
public getNameId ( ) : array | null
Résultat array | null The name identifier of the assertion.

getNameIdPolicy() public méthode

Retrieve the NameIdPolicy.
See also: SAML2\AuthnRequest::setNameIdPolicy()
public getNameIdPolicy ( ) : array
Résultat array The NameIdPolicy.

getProtocolBinding() public méthode

Retrieve the value of the ProtocolBinding attribute.
public getProtocolBinding ( ) : string | null
Résultat string | null The ProtocolBinding attribute.

getProviderName() public méthode

Retrieve the value of the ProviderName attribute.
public getProviderName ( ) : string
Résultat string The ProviderName attribute.

getProxyCount() public méthode

public getProxyCount ( ) : integer
Résultat integer

getRequestedAuthnContext() public méthode

Retrieve the RequestedAuthnContext.
public getRequestedAuthnContext ( ) : array | null
Résultat array | null The RequestedAuthnContext.

getRequesterID() public méthode

public getRequesterID ( ) : array
Résultat array

getSubjectConfirmation() public méthode

Retrieve the SubjectConfirmation elements we have in our Subject element.
public getSubjectConfirmation ( ) : SAML2\XML\saml\SubjectConfirmation[]
Résultat SAML2\XML\saml\SubjectConfirmation[]

parseNameIdPolicy() protected méthode

protected parseNameIdPolicy ( DOMElement $xml )
$xml DOMElement

parseRequestedAuthnContext() protected méthode

protected parseRequestedAuthnContext ( DOMElement $xml )
$xml DOMElement

parseScoping() protected méthode

protected parseScoping ( DOMElement $xml )
$xml DOMElement

setAssertionConsumerServiceIndex() public méthode

Set the value of the AssertionConsumerServiceIndex attribute.
public setAssertionConsumerServiceIndex ( integer | null $assertionConsumerServiceIndex )
$assertionConsumerServiceIndex integer | null The AssertionConsumerServiceIndex attribute.

setAssertionConsumerServiceURL() public méthode

Set the value of the AssertionConsumerServiceURL attribute.
public setAssertionConsumerServiceURL ( string | null $assertionConsumerServiceURL )
$assertionConsumerServiceURL string | null The AssertionConsumerServiceURL attribute.

setAttributeConsumingServiceIndex() public méthode

Set the value of the AttributeConsumingServiceIndex attribute.
public setAttributeConsumingServiceIndex ( integer | null $attributeConsumingServiceIndex )
$attributeConsumingServiceIndex integer | null The AttributeConsumingServiceIndex attribute.

setForceAuthn() public méthode

Set the value of the ForceAuthn attribute.
public setForceAuthn ( boolean $forceAuthn )
$forceAuthn boolean The ForceAuthn attribute.

setIDPList() public méthode

See Core 3.4.1.2 for the definition of scoping. Currently we support an IDPList of idpEntries. Each idpEntries consists of an array, containing keys (mapped to attributes) and corresponding values. Allowed attributes: Loc, Name, ProviderID. For backward compatibility, an idpEntries can also be a string instead of an array, where each string is mapped to the value of attribute ProviderID.
public setIDPList ( $IDPList )

setIsPassive() public méthode

Set the value of the IsPassive attribute.
public setIsPassive ( boolean $isPassive )
$isPassive boolean The IsPassive attribute.

setNameId() public méthode

The NameId must be in the format accepted by \SAML2\Utils::addNameId().
See also: SAML2\Utils::addNameId()
public setNameId ( array | null $nameId )
$nameId array | null The name identifier of the assertion.

setNameIdPolicy() public méthode

This function accepts an array with the following options: - 'Format' - 'SPNameQualifier' - 'AllowCreate'
public setNameIdPolicy ( array $nameIdPolicy )
$nameIdPolicy array The NameIDPolicy.

setProtocolBinding() public méthode

Set the value of the ProtocolBinding attribute.
public setProtocolBinding ( string $protocolBinding )
$protocolBinding string The ProtocolBinding attribute.

setProviderName() public méthode

Set the value of the ProviderName attribute.
public setProviderName ( string $ProviderName )
$ProviderName string The ProviderName attribute.

setProxyCount() public méthode

public setProxyCount ( integer $ProxyCount )
$ProxyCount integer

setRequestedAuthnContext() public méthode

Set the RequestedAuthnContext.
public setRequestedAuthnContext ( array | null $requestedAuthnContext )
$requestedAuthnContext array | null The RequestedAuthnContext.

setRequesterID() public méthode

public setRequesterID ( array $RequesterID )
$RequesterID array

setSubjectConfirmation() public méthode

Set the SubjectConfirmation elements that should be included in the assertion.
public setSubjectConfirmation ( array $subjectConfirmation )
$subjectConfirmation array

toUnsignedXML() public méthode

Convert this authentication request to an XML element.
public toUnsignedXML ( ) : DOMElement
Résultat DOMElement This authentication request.