本文整理汇总了Java中org.openid4java.server.ServerManager.setSharedAssociations方法的典型用法代码示例。如果您正苦于以下问题:Java ServerManager.setSharedAssociations方法的具体用法?Java ServerManager.setSharedAssociations怎么用?Java ServerManager.setSharedAssociations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openid4java.server.ServerManager
的用法示例。
在下文中一共展示了ServerManager.setSharedAssociations方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import org.openid4java.server.ServerManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
request.addParameter("openid.identity", "http://openid.ja-sig.org/battags");
request.addParameter("openid.return_to", "http://www.ja-sig.org/?service=fa");
request.addParameter("openid.mode", "checkid_setup");
sharedAssociations = mock(ServerAssociationStore.class);
manager = new ServerManager();
manager.setOPEndpointUrl("https://localshot:8443/cas/login");
manager.setEnforceRpId(false);
manager.setSharedAssociations(sharedAssociations);
context = mock(ApplicationContext.class);
cas = mock(CentralAuthenticationService.class);
when(context.getBean("serverManager")).thenReturn(manager);
when(context.getBean("centralAuthenticationService", CentralAuthenticationService.class)).thenReturn(cas);
final ApplicationContextProvider contextProvider = new ApplicationContextProvider();
contextProvider.setApplicationContext(context);
}
示例2: serverManager
import org.openid4java.server.ServerManager; //导入方法依赖的package包/类
@RefreshScope
@Bean
public ServerManager serverManager() {
final ServerManager manager = new ServerManager();
manager.setOPEndpointUrl(casProperties.getServer().getLoginUrl());
manager.setEnforceRpId(casProperties.getAuthn().getOpenid().isEnforceRpId());
manager.setSharedAssociations(new InMemoryServerAssociationStore());
LOGGER.info("Creating openid server manager with OP endpoint [{}]", casProperties.getServer().getLoginUrl());
return manager;
}
示例3: setUp
import org.openid4java.server.ServerManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
request.addParameter("openid.identity", "http://openid.ja-sig.org/battags");
request.addParameter("openid.return_to", "http://www.ja-sig.org/?service=fa");
request.addParameter("openid.mode", "checkid_setup");
sharedAssociations = mock(ServerAssociationStore.class);
manager = new ServerManager();
manager.setOPEndpointUrl("https://localshot:8443/cas/login");
manager.setEnforceRpId(false);
manager.setSharedAssociations(sharedAssociations);
context = mock(ApplicationContext.class);
ApplicationContextProvider contextProvider = new ApplicationContextProvider();
contextProvider.setApplicationContext(context);
cas = mock(CentralAuthenticationService.class);
}