本文整理汇总了Java中org.jasig.cas.authentication.UsernamePasswordCredential.setPassword方法的典型用法代码示例。如果您正苦于以下问题:Java UsernamePasswordCredential.setPassword方法的具体用法?Java UsernamePasswordCredential.setPassword怎么用?Java UsernamePasswordCredential.setPassword使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jasig.cas.authentication.UsernamePasswordCredential
的用法示例。
在下文中一共展示了UsernamePasswordCredential.setPassword方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCredentialsWithDifferentUsernameAndPassword
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
public static UsernamePasswordCredential getCredentialsWithDifferentUsernameAndPassword(
final String username, final String password) {
final UsernamePasswordCredential usernamePasswordCredentials = new UsernamePasswordCredential();
usernamePasswordCredentials.setUsername(username);
usernamePasswordCredentials.setPassword(password);
return usernamePasswordCredentials;
}
示例2: verifyAuthenticatesUserInFileWithCommaSeparator
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test
public void verifyAuthenticatesUserInFileWithCommaSeparator() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
this.authenticationHandler.setFileName(
new ClassPathResource("org/jasig/cas/adaptors/generic/authentication2.txt"));
this.authenticationHandler.setSeparator(",");
c.setUsername("scott");
c.setPassword("rutgers");
assertNotNull(this.authenticationHandler.authenticate(c));
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:14,代码来源:FileAuthenticationHandlerTests.java
示例3: verifyFailsUserInMap
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test(expected=FailedLoginException.class)
public void verifyFailsUserInMap() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
c.setUsername("scott");
c.setPassword("rutgers");
this.authenticationHandler.authenticate(c);
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:9,代码来源:RejectUsersAuthenticationHandlerTests.java
示例4: verifyPassesUserNotInMap
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test
public void verifyPassesUserNotInMap() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
c.setUsername("fds");
c.setPassword("rutgers");
assertNotNull(this.authenticationHandler.authenticate(c));
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:10,代码来源:RejectUsersAuthenticationHandlerTests.java
示例5: verifyPassesNullUserName
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test(expected = AccountNotFoundException.class)
public void verifyPassesNullUserName() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
c.setUsername(null);
c.setPassword("user");
this.authenticationHandler.authenticate(c);
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:10,代码来源:RejectUsersAuthenticationHandlerTests.java
示例6: verifyAuthenticatesUserInFileWithDefaultSeparator
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test
public void verifyAuthenticatesUserInFileWithDefaultSeparator() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
c.setUsername("scott");
c.setPassword("rutgers");
assertNotNull(this.authenticationHandler.authenticate(c));
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:10,代码来源:FileAuthenticationHandlerTests.java
示例7: verifyFailsUserNotInFileWithCommaSeparator
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test(expected = AccountNotFoundException.class)
public void verifyFailsUserNotInFileWithCommaSeparator() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
this.authenticationHandler.setFileName(
new ClassPathResource("org/jasig/cas/adaptors/generic/authentication2.txt"));
this.authenticationHandler.setSeparator(",");
c.setUsername("fds");
c.setPassword("rutgers");
this.authenticationHandler.authenticate(c);
}
示例8: verifyFailsNullUserName
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test(expected = AccountNotFoundException.class)
public void verifyFailsNullUserName() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
c.setUsername(null);
c.setPassword("user");
this.authenticationHandler.authenticate(c);
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:9,代码来源:FileAuthenticationHandlerTests.java
示例9: testFailsGoodUsernameBadPassword
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test(expected = FailedLoginException.class)
public void testFailsGoodUsernameBadPassword() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
this.authenticationHandler.setFileName(
new ClassPathResource("org/jasig/cas/adaptors/generic/authentication2.txt"));
this.authenticationHandler.setSeparator(",");
c.setUsername("scott");
c.setPassword("rutgers1");
this.authenticationHandler.authenticate(c);
}
示例10: verifyFailsNullPassword
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test(expected = FailedLoginException.class)
public void verifyFailsNullPassword() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
c.setUsername("scott");
c.setPassword(null);
this.authenticationHandler.authenticate(c);
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:10,代码来源:FileAuthenticationHandlerTests.java
示例11: testFailsNullUserNameAndPassword
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test(expected = AccountNotFoundException.class)
public void testFailsNullUserNameAndPassword() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
c.setUsername(null);
c.setPassword(null);
this.authenticationHandler.authenticate(c);
}
示例12: verifyFailsGoodUsernameBadPassword
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test(expected = FailedLoginException.class)
public void verifyFailsGoodUsernameBadPassword() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
this.authenticationHandler.setFileName(
new ClassPathResource("org/jasig/cas/adaptors/generic/authentication2.txt"));
this.authenticationHandler.setSeparator(",");
c.setUsername("scott");
c.setPassword("rutgers1");
this.authenticationHandler.authenticate(c);
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:14,代码来源:FileAuthenticationHandlerTests.java
示例13: verifyAuthenticateNoFileName
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test(expected = PreventedException.class)
public void verifyAuthenticateNoFileName() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
this.authenticationHandler.setFileName(new ClassPathResource("fff"));
c.setUsername("scott");
c.setPassword("rutgers");
this.authenticationHandler.authenticate(c);
}
示例14: testSupportsProperUserCredentials
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test
public void testSupportsProperUserCredentials() throws Exception {
UsernamePasswordCredential c = new UsernamePasswordCredential();
c.setUsername("fff");
c.setPassword("rutgers");
assertNotNull(this.authenticationHandler.authenticate(c));
}
示例15: testFailsUserNotInFileWithDefaultSeparator
import org.jasig.cas.authentication.UsernamePasswordCredential; //导入方法依赖的package包/类
@Test(expected = AccountNotFoundException.class)
public void testFailsUserNotInFileWithDefaultSeparator() throws Exception {
final UsernamePasswordCredential c = new UsernamePasswordCredential();
c.setUsername("fds");
c.setPassword("rutgers");
this.authenticationHandler.authenticate(c);
}