PHP 클래스 SAML2\AssertionTest

상속: extends PHPUnit_Framework_TestCase
파일 보기 프로젝트 열기: simplesamlphp/saml2

공개 메소드들

메소드 설명
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.