PHP Класс SAML2\AssertionTest

Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект

Открытые методы

Метод Описание
testAssertionVersionOtherThan20ThrowsException ( ) An assertion must always be version "2.0".
testAssertionWithoutIDthrowsException ( ) An assertion without an ID must throw an exception
testAssertionWithoutIssuerThrowsException ( ) An assertion must always have an Issuer element.
testAttributeValuesWithComplexTypesAreParsedCorrectly ( )
testAuthnContextDeclAndClassRef ( ) Test parsing AuthnContext elements Decl and ClassRef
testAuthnContextDeclAndRefConstraint ( )
testAuthnContextDeclRefAndClassRef ( ) Test parsing AuthnContext elements DeclRef and ClassRef
testConditionAllowedTypes ( ) Test various types of allowed Conditions.
testConditionWithUnknownNamespaceThrowsException ( ) A Condition must be of namespace saml.
testCorrectSignatureMethodCanBeExtracted ( )
testEncryptedAttributeValuesWithComplexTypeValuesAreParsedCorrectly ( )
testEptiAttributeParsingSupportsMultipleValues ( ) as per http://software.internet2.edu/eduperson/internet2-mace-dir-eduperson-201310.html#eduPersonTargetedID it is multivalued
testEptiAttributeValuesAreParsedCorrectly ( )
testEptiAttributeValuesMustBeANameID ( )
testHasEncryptedAttributes ( )
testMarshalling ( ) Test to build a basic assertion
testMarshallingUnmarshallingChristmas ( ) Test an assertion with lots of options
testMissingAuthnContextThrowsException ( ) No AuthnContext inside AuthnStatement will throw Exception.
testMissingAuthnInstantThrowsException ( ) AuthnStatement must have AuthnInstant attribute, if missing throw Exception.
testMissingNameOnAttribute ( ) When an Attribute element has no name, exception is thrown.
testMixedAttributeNameFormats ( ) If this assertion mixes Attribute NameFormats, the AttributeNameFormat of this assertion will be set to unspecified.
testMoreThanOneAuthnContextClassRefThrowsException ( ) More than one AuthnContextClassRef inside AuthnContext will throw Exception.
testMoreThanOneAuthnContextDeclRefThrowsException ( ) More than one AuthnContextDeclRef inside AuthnContext will throw Exception.
testMoreThanOneAuthnContextDeclThrowsException ( ) More than one AuthnContextDecl inside AuthnContext will throw Exception.
testMoreThanOneAuthnContextThrowsException ( ) More than one AuthnContext inside AuthnStatement will throw Exception.
testMoreThanOneAuthnStatementThrowsException ( ) More than one AuthnStatement will throw Exception.
testMoreThanOneNameIDThrowsException ( ) No more than one NameID may be present in the Subject
testMoreThanOneSubjectThrowsException ( ) More than one is not allowed in an Assertion.
testMustHaveClassRefOrDeclOrDeclRef ( )
testNameIDunmarshalling ( ) Test basic NameID unmarshalling.
testNameIdEncryption ( ) Test NameID Encryption and Decryption.
testNoAuthnContextDeclRefFallback ( ) Tests that AuthnContextDeclRef is not mistaken for AuthnContextClassRef.
testRetrieveEncryptedNameIdException ( ) Test Exception when trying to get encrypted NameId without decrypting it first.
testSetAuthnContextDecl ( ) Test setting an AuthnContextDecl chunk.
testSubjectMustHaveNameIDorSubjectConfirmation ( ) A wtthout both NameID and SubjectConfirmation throws exception.
testTooManyConditionsThrowsException ( ) An Assertion may not have more than one
testTypedAttributeValuesAreParsedCorrectly ( )
testTypedEncryptedAttributeValuesAreParsedCorrectly ( )
testUnkownThrowsException ( ) Any Condition other than AudienceRestirction, OneTimeUse and ProxyRestriction must throw an Exception.
testUnmarshalling ( ) Test to parse a basic assertion
testVerifySignedAssertion ( ) Try to verify a signed assertion.
testVerifySignedAssertionChangedBody ( ) Try to verify a signed assertion in which a byte was changed after signing.
testVerifySignedAssertionWrongKey ( ) Try to verify a signed assertion with the wrong key.
testVerifyUnsignedAssertion ( ) Calling validate on an unsigned assertion must return false, not an exception.

Описание методов

testAssertionVersionOtherThan20ThrowsException() публичный Метод

An assertion must always be version "2.0".

testAssertionWithoutIDthrowsException() публичный Метод

An assertion without an ID must throw an exception

testAssertionWithoutIssuerThrowsException() публичный Метод

An assertion must always have an Issuer element.

testAttributeValuesWithComplexTypesAreParsedCorrectly() публичный Метод

testAuthnContextDeclAndClassRef() публичный Метод

Test parsing AuthnContext elements Decl and ClassRef

testAuthnContextDeclAndRefConstraint() публичный Метод

testAuthnContextDeclRefAndClassRef() публичный Метод

Test parsing AuthnContext elements DeclRef and ClassRef

testConditionAllowedTypes() публичный Метод

- AudienceRestriction: are ANDed together so should only be audience1 - OneTimeUse and ProxyRestrictions must be accepted but are currently a no-op.

testConditionWithUnknownNamespaceThrowsException() публичный Метод

A Condition must be of namespace saml.

testCorrectSignatureMethodCanBeExtracted() публичный Метод

testEncryptedAttributeValuesWithComplexTypeValuesAreParsedCorrectly() публичный Метод

testEptiAttributeParsingSupportsMultipleValues() публичный Метод

as per http://software.internet2.edu/eduperson/internet2-mace-dir-eduperson-201310.html#eduPersonTargetedID it is multivalued

testEptiAttributeValuesAreParsedCorrectly() публичный Метод

testEptiAttributeValuesMustBeANameID() публичный Метод

testHasEncryptedAttributes() публичный Метод

testMarshalling() публичный Метод

Test to build a basic assertion
public testMarshalling ( )

testMarshallingUnmarshallingChristmas() публичный Метод

Test an assertion with lots of options

testMissingAuthnContextThrowsException() публичный Метод

No AuthnContext inside AuthnStatement will throw Exception.

testMissingAuthnInstantThrowsException() публичный Метод

AuthnStatement must have AuthnInstant attribute, if missing throw Exception.

testMissingNameOnAttribute() публичный Метод

When an Attribute element has no name, exception is thrown.

testMixedAttributeNameFormats() публичный Метод

If this assertion mixes Attribute NameFormats, the AttributeNameFormat of this assertion will be set to unspecified.

testMoreThanOneAuthnContextClassRefThrowsException() публичный Метод

More than one AuthnContextClassRef inside AuthnContext will throw Exception.

testMoreThanOneAuthnContextDeclRefThrowsException() публичный Метод

More than one AuthnContextDeclRef inside AuthnContext will throw Exception.

testMoreThanOneAuthnContextDeclThrowsException() публичный Метод

More than one AuthnContextDecl inside AuthnContext will throw Exception.

testMoreThanOneAuthnContextThrowsException() публичный Метод

More than one AuthnContext inside AuthnStatement will throw Exception.

testMoreThanOneAuthnStatementThrowsException() публичный Метод

More than one AuthnStatement will throw Exception.

testMoreThanOneNameIDThrowsException() публичный Метод

No more than one NameID may be present in the Subject

testMoreThanOneSubjectThrowsException() публичный Метод

More than one is not allowed in an Assertion.

testMustHaveClassRefOrDeclOrDeclRef() публичный Метод

testNameIDunmarshalling() публичный Метод

Test basic NameID unmarshalling.

testNameIdEncryption() публичный Метод

Test NameID Encryption and Decryption.

testNoAuthnContextDeclRefFallback() публичный Метод

This tests against reintroduction of removed behavior.

testRetrieveEncryptedNameIdException() публичный Метод

Test Exception when trying to get encrypted NameId without decrypting it first.

testSetAuthnContextDecl() публичный Метод

Test setting an AuthnContextDecl chunk.

testSubjectMustHaveNameIDorSubjectConfirmation() публичный Метод

A wtthout both NameID and SubjectConfirmation throws exception.

testTooManyConditionsThrowsException() публичный Метод

An Assertion may not have more than one

testTypedAttributeValuesAreParsedCorrectly() публичный Метод

testTypedEncryptedAttributeValuesAreParsedCorrectly() публичный Метод

testUnkownThrowsException() публичный Метод

Any Condition other than AudienceRestirction, OneTimeUse and ProxyRestriction must throw an Exception.

testUnmarshalling() публичный Метод

Test to parse a basic assertion
public testUnmarshalling ( )

testVerifySignedAssertion() публичный Метод

Try to verify a signed assertion.

testVerifySignedAssertionChangedBody() публичный Метод

Must yield a validation exception.

testVerifySignedAssertionWrongKey() публичный Метод

Must yield a signature validation exception.

testVerifyUnsignedAssertion() публичный Метод

Calling validate on an unsigned assertion must return false, not an exception.