Does anyone have an example config or documentation on how to delegate
to Azure AD? This is operating at the very edge of my understanding, and
I'm having some difficulty. Not entirely sure what configs are required,
or exactly what to set in Azure.
Right now I have:
cas.authn.pac4j.oidc[0].type=AZURE
cas.authn.pac4j.oidc[0].id=<client id>
cas.authn.pac4j.oidc[0].secret=<client-secret>
cas.authn.pac4j.oidc[0].clientName=AZURE
cas.authn.pac4j.oidc[0].discoveryUri=
https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration
cas.authn.pac4j.oidc[0].scope=openid email profile phone
cas.authn.pac4j.oidc[0].azureTenantId=<directory-id>
No idea if those scopes are right.
Getting:
2019-03-29 15:53:33,486 ERROR
[org.springframework.boot.web.support.ErrorPageFilter] - <Forwarding to
error page from request [/clientredirect] due to exception
[java.lang.ClassCastException: java.util.Collections$SingletonList
cannot be cast to java.lang.String]>
org.pac4j.core.exception.TechnicalException:
java.lang.ClassCastException: java.util.Collections$SingletonList cannot
be cast to java.lang.String
at
org.pac4j.oidc.redirect.OidcRedirectActionBuilder.buildAuthenticationRequestUrl(OidcRedirectActionBuilder.java:113)
~[pac4j-oidc-3.6.1.jar:?]
at
org.pac4j.oidc.redirect.OidcRedirectActionBuilder.redirect(OidcRedirectActionBuilder.java:78)
~[pac4j-oidc-3.6.1.jar:?]
at
org.pac4j.core.client.IndirectClient.getRedirectAction(IndirectClient.java:109)
~[pac4j-core-3.6.1.jar:?]
Caused by: java.lang.ClassCastException:
java.util.Collections$SingletonList cannot be cast to java.lang.String
at
com.nimbusds.oauth2.sdk.AuthorizationRequest.parse(AuthorizationRequest.java:972)
~[oauth2-oidc-sdk-5.62.jar:5.62]
at
com.nimbusds.openid.connect.sdk.AuthenticationRequest.parse(AuthenticationRequest.java:1374)
~[oauth2-oidc-sdk-5.62.jar:5.62]
at
com.nimbusds.openid.connect.sdk.AuthenticationRequest.parse(AuthenticationRequest.java:1340)
~[oauth2-oidc-sdk-5.62.jar:5.62]
at
org.pac4j.oidc.redirect.OidcRedirectActionBuilder.buildAuthenticationRequestUrl(OidcRedirectActionBuilder.java:110)
~[pac4j-oidc-3.6.1.jar:?]
... 98 more
Any suggestions would be helpful, because I'm having difficulty pulling
off the right search to find the right set of documentation at MS.
Thanks,
Richard