当前位置: 首页>>代码示例>>Java>>正文


Java CentralAuthenticationService类代码示例

本文整理汇总了Java中org.apereo.cas.CentralAuthenticationService的典型用法代码示例。如果您正苦于以下问题:Java CentralAuthenticationService类的具体用法?Java CentralAuthenticationService怎么用?Java CentralAuthenticationService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CentralAuthenticationService类属于org.apereo.cas包,在下文中一共展示了CentralAuthenticationService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: OidcAccessTokenEndpointController

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public OidcAccessTokenEndpointController(final ServicesManager servicesManager,
                                         final TicketRegistry ticketRegistry,
                                         final OAuth20Validator validator,
                                         final AccessTokenFactory accessTokenFactory,
                                         final PrincipalFactory principalFactory,
                                         final ServiceFactory<WebApplicationService> webApplicationServiceServiceFactory,
                                         final RefreshTokenFactory refreshTokenFactory,
                                         final AccessTokenResponseGenerator accessTokenResponseGenerator,
                                         final OAuth20ProfileScopeToAttributesFilter scopeToAttributesFilter,
                                         final CasConfigurationProperties casProperties,
                                         final CookieRetrievingCookieGenerator cookieGenerator,
                                         final OAuth20CasAuthenticationBuilder authenticationBuilder,
                                         final CentralAuthenticationService centralAuthenticationService) {
    super(servicesManager, ticketRegistry, validator, accessTokenFactory, principalFactory,
            webApplicationServiceServiceFactory, refreshTokenFactory, accessTokenResponseGenerator,
            scopeToAttributesFilter, casProperties, cookieGenerator, authenticationBuilder,
            centralAuthenticationService);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:19,代码来源:OidcAccessTokenEndpointController.java

示例2: verifyValidPrincipal

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
@Test
public void verifyValidPrincipal() throws InvalidTicketException {
    final CentralAuthenticationService cas = mock(CentralAuthenticationService.class);
    final ServicesManager mgr = mock(ServicesManager.class);
    final ServiceFactory factory = mock(ServiceFactory.class);
    
    final Authentication authn = mock(Authentication.class);
    when(authn.getPrincipal()).thenReturn(
            CoreAuthenticationTestUtils.getPrincipal("cas"));
    final TicketGrantingTicket tgt = mock(TicketGrantingTicket.class);
    when(tgt.getAuthentication()).thenReturn(authn);
    
    when(cas.getTicket(any(String.class), any(Ticket.class.getClass()))).thenReturn(tgt);
    final GenericSuccessViewAction action = new GenericSuccessViewAction(cas, mgr, factory, "");
    final Principal p = action.getAuthenticationPrincipal("TGT-1");
    assertNotNull(p);
    assertEquals(p.getId(), "cas");
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:19,代码来源:GenericSuccessViewActionTests.java

示例3: OAuth20AccessTokenEndpointController

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public OAuth20AccessTokenEndpointController(final ServicesManager servicesManager,
                                            final TicketRegistry ticketRegistry,
                                            final OAuth20Validator validator,
                                            final AccessTokenFactory accessTokenFactory,
                                            final PrincipalFactory principalFactory,
                                            final ServiceFactory<WebApplicationService> webApplicationServiceServiceFactory,
                                            final RefreshTokenFactory refreshTokenFactory,
                                            final AccessTokenResponseGenerator accessTokenResponseGenerator,
                                            final OAuth20ProfileScopeToAttributesFilter scopeToAttributesFilter,
                                            final CasConfigurationProperties casProperties,
                                            final CookieRetrievingCookieGenerator ticketGrantingTicketCookieGenerator,
                                            final OAuth20CasAuthenticationBuilder authenticationBuilder,
                                            final CentralAuthenticationService centralAuthenticationService) {
    super(servicesManager, ticketRegistry, validator, accessTokenFactory,
            principalFactory, webApplicationServiceServiceFactory,
            scopeToAttributesFilter, casProperties, ticketGrantingTicketCookieGenerator);
    this.refreshTokenFactory = refreshTokenFactory;
    this.accessTokenResponseGenerator = accessTokenResponseGenerator;
    this.authenticationBuilder = authenticationBuilder;
    this.centralAuthenticationService = centralAuthenticationService;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:22,代码来源:OAuth20AccessTokenEndpointController.java

示例4: OAuth20AccessTokenEndpointController

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public OAuth20AccessTokenEndpointController(ServicesManager servicesManager, TicketRegistry ticketRegistry,
                                            OAuth20Validator validator, AccessTokenFactory accessTokenFactory,
                                            PrincipalFactory principalFactory,
                                            ServiceFactory<WebApplicationService> webApplicationServiceServiceFactory,
                                            RefreshTokenFactory refreshTokenFactory,
                                            AccessTokenResponseGenerator accessTokenResponseGenerator,
                                            OAuth20ProfileScopeToAttributesFilter scopeToAttributesFilter,
                                            CasConfigurationProperties casProperties,
                                            CookieRetrievingCookieGenerator ticketGrantingTicketCookieGenerator,
                                            OAuth20CasAuthenticationBuilder authenticationBuilder,
                                            CentralAuthenticationService centralAuthenticationService) {
    super(servicesManager, ticketRegistry, validator, accessTokenFactory, principalFactory, webApplicationServiceServiceFactory,
        scopeToAttributesFilter, casProperties, ticketGrantingTicketCookieGenerator);
    this.refreshTokenFactory = refreshTokenFactory;
    this.accessTokenResponseGenerator = accessTokenResponseGenerator;
    this.authenticationBuilder = authenticationBuilder;
    this.centralAuthenticationService = centralAuthenticationService;
}
 
开发者ID:e-gov,项目名称:TARA-Server,代码行数:19,代码来源:OAuth20AccessTokenEndpointController.java

示例5: RadiusAuthenticationWebflowEventResolver

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public RadiusAuthenticationWebflowEventResolver(final AuthenticationSystemSupport authenticationSystemSupport,
                                                final CentralAuthenticationService centralAuthenticationService, 
                                                final ServicesManager servicesManager,
                                                final TicketRegistrySupport ticketRegistrySupport, 
                                                final CookieGenerator warnCookieGenerator,
                                                final AuthenticationServiceSelectionPlan authenticationSelectionStrategies,
                                                final MultifactorAuthenticationProviderSelector selector) {
    super(authenticationSystemSupport, centralAuthenticationService, 
            servicesManager, ticketRegistrySupport, warnCookieGenerator,
            authenticationSelectionStrategies, selector);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:12,代码来源:RadiusAuthenticationWebflowEventResolver.java

示例6: GrouperMultifactorAuthenticationPolicyEventResolver

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public GrouperMultifactorAuthenticationPolicyEventResolver(final AuthenticationSystemSupport authenticationSystemSupport,
                                                           final CentralAuthenticationService centralAuthenticationService,
                                                           final ServicesManager servicesManager, final TicketRegistrySupport ticketRegistrySupport,
                                                           final CookieGenerator warnCookieGenerator,
                                                           final AuthenticationServiceSelectionPlan authenticationSelectionStrategies,
                                                           final MultifactorAuthenticationProviderSelector selector,
                                                           final CasConfigurationProperties casProperties) {
    super(authenticationSystemSupport, centralAuthenticationService, servicesManager, ticketRegistrySupport, warnCookieGenerator,
            authenticationSelectionStrategies, selector);
    grouperField = casProperties.getAuthn().getMfa().getGrouperGroupField().toUpperCase();
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:12,代码来源:GrouperMultifactorAuthenticationPolicyEventResolver.java

示例7: StatisticsController

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public StatisticsController(final DelegatingAuditTrailManager auditTrailManager,
                            final CentralAuthenticationService centralAuthenticationService,
                            final MetricRegistry metricsRegistry,
                            final HealthCheckRegistry healthCheckRegistry,
                            final CasConfigurationProperties casProperties) {
    super("casstats", "/stats", casProperties.getMonitor().getEndpoints().getStatistics(), casProperties);
    this.auditTrailManager = auditTrailManager;
    this.centralAuthenticationService = centralAuthenticationService;
    this.metricsRegistry = metricsRegistry;
    this.healthCheckRegistry = healthCheckRegistry;
    this.casProperties = casProperties;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:13,代码来源:StatisticsController.java

示例8: RegisteredServiceResource

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public RegisteredServiceResource(final ServicesManager servicesManager, final CentralAuthenticationService centralAuthenticationService,
                                 final String attributeName, final String attributeValue) {
    this.servicesManager = servicesManager;
    this.centralAuthenticationService = centralAuthenticationService;
    this.attributeName = attributeName;
    this.attributeValue = attributeValue;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:RegisteredServiceResource.java

示例9: RiskAwareAuthenticationWebflowEventResolver

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public RiskAwareAuthenticationWebflowEventResolver(final AuthenticationSystemSupport authenticationSystemSupport,
                                                   final CentralAuthenticationService centralAuthenticationService, final ServicesManager servicesManager,
                                                   final TicketRegistrySupport ticketRegistrySupport, final CookieGenerator warnCookieGenerator,
                                                   final AuthenticationServiceSelectionPlan authenticationSelectionStrategies,
                                                   final MultifactorAuthenticationProviderSelector selector,
                                                   final AuthenticationRiskEvaluator authenticationRiskEvaluator,
                                                   final AuthenticationRiskMitigator authenticationRiskMitigator,
                                                   final CasConfigurationProperties casProperties) {
    super(authenticationSystemSupport, centralAuthenticationService, servicesManager, ticketRegistrySupport, warnCookieGenerator,
            authenticationSelectionStrategies, selector);
    this.authenticationRiskEvaluator = authenticationRiskEvaluator;
    this.authenticationRiskMitigator = authenticationRiskMitigator;
    threshold = casProperties.getAuthn().getAdaptive().getRisk().getThreshold();
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:15,代码来源:RiskAwareAuthenticationWebflowEventResolver.java

示例10: YubiKeyAuthenticationWebflowEventResolver

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public YubiKeyAuthenticationWebflowEventResolver(final AuthenticationSystemSupport authenticationSystemSupport,
                                                 final CentralAuthenticationService centralAuthenticationService, final ServicesManager servicesManager,
                                                 final TicketRegistrySupport ticketRegistrySupport, final CookieGenerator warnCookieGenerator,
                                                 final AuthenticationServiceSelectionPlan authenticationSelectionStrategies,
                                                 final MultifactorAuthenticationProviderSelector selector) {
    super(authenticationSystemSupport, centralAuthenticationService, servicesManager, ticketRegistrySupport, warnCookieGenerator,
            authenticationSelectionStrategies, selector);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:9,代码来源:YubiKeyAuthenticationWebflowEventResolver.java

示例11: OpenIdServiceResponseBuilder

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
/**
 * Instantiates a new Open id service response builder.
 *
 * @param openIdPrefixUrl              the open id prefix url
 * @param serverManager                the server manager
 * @param centralAuthenticationService the central authentication service
 */
public OpenIdServiceResponseBuilder(final String openIdPrefixUrl,
                                    final ServerManager serverManager,
                                    final CentralAuthenticationService centralAuthenticationService) {
    this.openIdPrefixUrl = openIdPrefixUrl;
    this.serverManager = serverManager;
    this.centralAuthenticationService = centralAuthenticationService;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:15,代码来源:OpenIdServiceResponseBuilder.java

示例12: TicketsResource

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public TicketsResource(final AuthenticationSystemSupport authenticationSystemSupport, final CredentialFactory credentialFactory,
                       final TicketRegistrySupport ticketRegistrySupport, final ServiceFactory webApplicationServiceFactory,
                       final CentralAuthenticationService centralAuthenticationService) {
    this.authenticationSystemSupport = authenticationSystemSupport;
    this.credentialFactory = credentialFactory;
    this.ticketRegistrySupport = ticketRegistrySupport;
    this.webApplicationServiceFactory = webApplicationServiceFactory;
    this.centralAuthenticationService = centralAuthenticationService;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:10,代码来源:TicketsResource.java

示例13: OidcAuthenticationContextWebflowEventEventResolver

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public OidcAuthenticationContextWebflowEventEventResolver(final AuthenticationSystemSupport authenticationSystemSupport,
                                                          final CentralAuthenticationService centralAuthenticationService,
                                                          final ServicesManager servicesManager,
                                                          final TicketRegistrySupport ticketRegistrySupport,
                                                          final CookieGenerator warnCookieGenerator,
                                                          final AuthenticationServiceSelectionPlan authenticationSelectionStrategies,
                                                          final MultifactorAuthenticationProviderSelector selector) {
    super(authenticationSystemSupport, centralAuthenticationService, servicesManager,
            ticketRegistrySupport, warnCookieGenerator,
            authenticationSelectionStrategies, selector);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:12,代码来源:OidcAuthenticationContextWebflowEventEventResolver.java

示例14: DelegatedClientAuthenticationAction

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
public DelegatedClientAuthenticationAction(final Clients clients, final AuthenticationSystemSupport authenticationSystemSupport,
                                           final CentralAuthenticationService centralAuthenticationService, final String themeParamName,
                                           final String localParamName, final boolean autoRedirect) {
    this.clients = clients;
    this.authenticationSystemSupport = authenticationSystemSupport;
    this.centralAuthenticationService = centralAuthenticationService;
    this.themeParamName = themeParamName;
    this.localParamName = localParamName;
    this.autoRedirect = autoRedirect;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:11,代码来源:DelegatedClientAuthenticationAction.java

示例15: verifyStartAuthentication

import org.apereo.cas.CentralAuthenticationService; //导入依赖的package包/类
@Test
public void verifyStartAuthentication() throws Exception {
    final MockHttpServletResponse mockResponse = new MockHttpServletResponse();
    final MockHttpServletRequest mockRequest = new MockHttpServletRequest();
    mockRequest.setParameter(ThemeChangeInterceptor.DEFAULT_PARAM_NAME, MY_THEME);
    mockRequest.setParameter(LocaleChangeInterceptor.DEFAULT_PARAM_NAME, MY_LOCALE);
    mockRequest.setParameter(CasProtocolConstants.PARAMETER_METHOD, MY_METHOD);

    final MockHttpSession mockSession = new MockHttpSession();
    mockRequest.setSession(mockSession);

    final ServletExternalContext servletExternalContext = mock(ServletExternalContext.class);
    when(servletExternalContext.getNativeRequest()).thenReturn(mockRequest);
    when(servletExternalContext.getNativeResponse()).thenReturn(mockResponse);

    final MockRequestContext mockRequestContext = new MockRequestContext();
    mockRequestContext.setExternalContext(servletExternalContext);
    mockRequestContext.getFlowScope().put(CasProtocolConstants.PARAMETER_SERVICE,
            RegisteredServiceTestUtils.getService(MY_SERVICE));

    final FacebookClient facebookClient = new FacebookClient(MY_KEY, MY_SECRET);
    final TwitterClient twitterClient = new TwitterClient("3nJPbVTVRZWAyUgoUKQ8UA", "h6LZyZJmcW46Vu8R47MYfeXTSYGI30EqnWaSwVhFkbA");
    final Clients clients = new Clients(MY_LOGIN_URL, facebookClient, twitterClient);
    final DelegatedClientAuthenticationAction action = new DelegatedClientAuthenticationAction(clients,
            null, mock(CentralAuthenticationService.class),
            "theme", "locale", false);

    final Event event = action.execute(mockRequestContext);
    assertEquals("error", event.getId());
    assertEquals(MY_THEME, mockSession.getAttribute(ThemeChangeInterceptor.DEFAULT_PARAM_NAME));
    assertEquals(MY_LOCALE, mockSession.getAttribute(LocaleChangeInterceptor.DEFAULT_PARAM_NAME));
    assertEquals(MY_METHOD, mockSession.getAttribute(CasProtocolConstants.PARAMETER_METHOD));
    final MutableAttributeMap flowScope = mockRequestContext.getFlowScope();
    final Set<DelegatedClientAuthenticationAction.ProviderLoginPageConfiguration> urls =
            (Set<DelegatedClientAuthenticationAction.ProviderLoginPageConfiguration>) flowScope.get(DelegatedClientAuthenticationAction.PAC4J_URLS);

    assertFalse(urls.isEmpty());
    assertSame(2, urls.size());
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:40,代码来源:DelegatedClientAuthenticationActionTests.java


注:本文中的org.apereo.cas.CentralAuthenticationService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。