Package net.shibboleth.idp.authn.impl
Class JAASCredentialValidatorTest
- java.lang.Object
-
- org.opensaml.core.OpenSAMLInitBaseTestCase
-
- net.shibboleth.idp.authn.impl.BaseAuthenticationContextTest
-
- net.shibboleth.idp.authn.impl.JAASCredentialValidatorTest
-
public class JAASCredentialValidatorTest extends BaseAuthenticationContextTest
Unit test for JAAS validation.
-
-
Field Summary
Fields Modifier and Type Field Description private net.shibboleth.idp.authn.impl.ValidateCredentialsactionprivate static StringDATA_PATHprivate com.unboundid.ldap.listener.InMemoryDirectoryServerdirectoryServerprivate net.shibboleth.idp.authn.impl.JAASCredentialValidatorvalidator-
Fields inherited from class net.shibboleth.idp.authn.impl.BaseAuthenticationContextTest
authenticationFlows, prc, src
-
-
Constructor Summary
Constructors Constructor Description JAASCredentialValidatorTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddoExtract()private StringgetCurrentDir()voidsetUp()voidsetupDirectoryServer()Creates an UnboundID in-memory directory server.voidteardownDirectoryServer()Shutdown the in-memory directory server.voidtestAuthorized()voidtestAuthorizedAndKeep()voidtestBadConfig()voidtestBadPassword()voidtestBadUsername()voidtestMatchAndAuthorized()voidtestMissingFlow()voidtestMissingUser()voidtestMissingUser2()voidtestMultiConfigAuthorized()voidtestNoConfig()voidtestSupported()voidtestUnmatchedUser()voidtestUnsupportedConfig()-
Methods inherited from class net.shibboleth.idp.authn.impl.BaseAuthenticationContextTest
initializeMembers
-
-
-
-
Field Detail
-
DATA_PATH
private static final String DATA_PATH
- See Also:
- Constant Field Values
-
validator
private net.shibboleth.idp.authn.impl.JAASCredentialValidator validator
-
action
private net.shibboleth.idp.authn.impl.ValidateCredentials action
-
directoryServer
private com.unboundid.ldap.listener.InMemoryDirectoryServer directoryServer
-
-
Method Detail
-
setupDirectoryServer
@BeforeClass public void setupDirectoryServer() throws com.unboundid.ldap.sdk.LDAPException
Creates an UnboundID in-memory directory server. Leverages LDIF found in test resources.- Throws:
com.unboundid.ldap.sdk.LDAPException- if the in-memory directory server cannot be created
-
teardownDirectoryServer
@AfterClass public void teardownDirectoryServer()
Shutdown the in-memory directory server.
-
setUp
@BeforeMethod public void setUp() throws Exception
- Overrides:
setUpin classBaseAuthenticationContextTest- Throws:
Exception
-
testMultiConfigAuthorized
public void testMultiConfigAuthorized() throws Exception- Throws:
Exception
-
getCurrentDir
private String getCurrentDir() throws IOException
- Throws:
IOException
-
-