This works:
@Autowired
Clients builtClients;
@PostConstruct
public void addSteamOpenIdClient() {
builtClients.getClients().add(new SteamOpenIdClient());
builtClients.reinit();
}
@Bean
public AuthenticationHandler openIDAuthenticationHandler(final
AuthenticationEventExecutionPlan plan) {
final ClientAuthenticationHandler handler = new
ClientAuthenticationHandler("OpenIdClientAuthHandler", servicesManager, new
DefaultPrincipalFactory(), builtClients);
plan.registerAuthenticationHandler(handler);
return handler;
}
But it does return the whole url as the ID so you'll have to pull out the
SteamId from the end:
01-17 14:22:39 DEBUG support.ClientAuthenticationHandler -
clientCredentials
[org.apereo.cas.authentication.principal.ClientCredential@3a86ccf3[id=<null>]]
01-17 14:22:39 DEBUG support.ClientAuthenticationHandler - clientName:
[SteamOpenIdClient]
01-17 14:22:39 DEBUG support.ClientAuthenticationHandler - client:
[#SteamOpenIdClient# | name: SteamOpenIdClient | callbackUrl:
https://auth-test.daybreakgames.com/login?client_name=SteamOpenIdClient |
urlResolver: org.pac4j.core.http.DefaultUrlResolver@281e917c |
ajaxRequestResolver:
org.pac4j.core.http.DefaultAjaxRequestResolver@5079ce36 |
includeClientNameInCallbackUrl: true | redirectActionBuilder:
com.dgc.plat.cas.steam.SteamRedirectActionBuilder@42012006 |
credentialsExtractor:
com.dgc.plat.cas.steam.SteamCredentialsExtractor@588ce794 | authenticator:
com.dgc.plat.cas.steam.SteamAuthenticator@4451888 | profileCreator:
org.pac4j.core.profile.creator.AuthenticatorProfileCreator@1ad37e48 |
logoutActionBuilder: org.pac4j.core.logout.NoLogoutActionBuilder@51196c04 |
authorizationGenerators: [] |]
01-17 14:22:39 DEBUG support.ClientAuthenticationHandler - userProfile:
[#SteamOpenIdProfile# | id: http://steamcommunity.com/openid/id/1234567890
| attributes: {} | roles: [] | permissions: [] | isRemembered: false |
clientName: SteamOpenIdClient | linkedId: null |]
01-17 14:22:39 DEBUG authentication.AbstractAuthenticationManager -
Authentication handler [OpenIdClientAuthHandler] successfully authenticated
[org.apereo.cas.authentication.principal.ClientCredential@3a86ccf3[id=http://steamcommunity.com/openid/id/1234567890]]
01-17 14:22:39 DEBUG authentication.AbstractAuthenticationManager - No
principal resolution is configured for [OpenIdClientAuthHandler]. Falling
back to handler principal [http://steamcommunity.com/openid/id/1234567890]
01-17 14:22:39 DEBUG authentication.AbstractAuthenticationManager - Final
principal resolved for this authentication event is
[http://steamcommunity.com/openid/id/1234567890]
01-17 14:22:39 DEBUG policy.AnyAuthenticationPolicy - Authentication policy
is satisfied having found at least one authentication transactions
01-17 14:22:39 INFO authentication.AbstractAuthenticationManager -
Authenticated
principal [http://steamcommunity.com/openid/id/1234567890] with attributes
[{}] via credentials
[[org.apereo.cas.authentication.principal.ClientCredential@3a86ccf3[id=http://steamcommunity.com/openid/id/1234567890]]].
01-17 14:22:39 DEBUG authentication.AbstractAuthenticationManager -
Invoking authentication metadata populators for authentication transaction
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/edc77f19-4b1f-4e06-86c2-cd009dcff0a2%40apereo.org.