Thanks Pablo, but yes I have. It never gets to the response however since
there are not authentication handlers that expect the password grant's
combination of client_id:client_secret and username:password.

On Thu, Jun 18, 2020 at 3:09 PM Pablo Vidaurri <[email protected]> wrote:

> Did you try adding a supportedResponseTypes value to your service config:
>
>   "supportedResponseTypes": [ "java.util.HashSet", [ "code", "token" ] ]
>
> -psv
>
> On Wednesday, June 17, 2020 at 5:20:15 PM UTC-5, Gary Rush wrote:
>>
>> I've gone through several simple example service configurations for both
>> 6.1.5 and 6.2.0-RC5, and I'm currently trying:
>>
>> {
>>   "@class" :
>> "org.apereo.cas.support.oauth.services.OAuthRegisteredService",
>>   "clientId": "client",
>>   "clientSecret": "secret",
>>   "serviceId" : "https://example.net/dashboard";,
>>   "name" : "OAUTH",
>>   "id" : 1,
>>   "attributeReleasePolicy" : {
>>     "@class" :
>> "org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy",
>>     "allowedAttributes" : [ "java.util.ArrayList", [ "cn", "mail", "sn" ]
>> ]
>>   },
>>   "supportedGrantTypes": [ "java.util.HashSet", [ "password" ] ]
>> }
>>
>> When a password grant request is made, CAS cannot find a valid
>> authentication handler. A UsernamePasswordCredential is extracted, but the
>> DelegatedClientAuthenticationHandler will only accept ClientCredentials.
>> Honestly after stepping though the code for days I don't see how this ever
>> worked. I assume it does however, so I must be missing something.
>>
>> curl "[my
>> server]/oauth2.0/token?grant_type=password&client_id=client&client_secret=secret&username=user&password=password"
>>
>> 2020-06-17 15:13:20,269 DEBUG
>> [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] -
>> <Authentication credentials provided for this transaction are
>> [[UsernamePasswordCredential(username=user, source=null, customFields={})]]>
>> 2020-06-17 15:13:20,270 DEBUG
>> [org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan] -
>> <Candidate/Registered authentication handlers for this transaction are
>> [[org.apereo.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler@20b9486d,
>> org.apereo.cas.support.openid.authentication.handler.support.OpenIdCredentialsAuthenticationHandler@4b249051,
>> org.apereo.cas.support.pac4j.authentication.handler.support.DelegatedClientAuthenticationHandler@7658ca71
>> ]]>
>> 2020-06-17 15:13:20,270 DEBUG
>> [org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan] -
>> <Authentication handler resolvers for this transaction are
>> [[org.apereo.cas.authentication.handler.RegisteredServiceAuthenticationHandlerResolver@7fa005d1
>> ]]>
>> 2020-06-17 15:13:20,270 DEBUG
>> [org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan] -
>> <Authentication handler resolvers produced no candidate authentication
>> handler. Using the default handler resolver instead...>
>> 2020-06-17 15:13:20,270 DEBUG
>> [org.apereo.cas.authentication.AuthenticationHandlerResolver] - <Default
>> authentication handlers used for this transaction are
>> [HttpBasedServiceCredentialsAuthenticationHandler,OpenIdCredentialsAuthenticationHandler,DelegatedClientAuthenticationHandler]>
>> 2020-06-17 15:13:20,270 DEBUG
>> [org.apereo.cas.authentication.DefaultAuthenticationEventExecutionPlan] -
>> <Resolved and finalized authentication handlers to carry out this
>> authentication transaction are
>> [[org.apereo.cas.authentication.handler.RegisteredServiceAuthenticationHandlerResolver@7fa005d1
>> ]]>
>> 2020-06-17 15:13:20,270 DEBUG
>> [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] -
>> <Candidate resolved authentication handlers for this transaction are
>> [[org.apereo.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler@20b9486d,
>> org.apereo.cas.support.openid.authentication.handler.support.OpenIdCredentialsAuthenticationHandler@4b249051,
>> org.apereo.cas.support.pac4j.authentication.handler.support.DelegatedClientAuthenticationHandler@7658ca71
>> ]]>
>> 2020-06-17 15:13:20,270 DEBUG
>> [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] -
>> <Attempting to authenticate credential
>> [UsernamePasswordCredential(username=user, source=null, customFields={})]>
>> 2020-06-17 15:13:20,270 DEBUG
>> [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] -
>> <Authentication handler [HttpBasedServiceCredentialsAuthenticationHandler]
>> does not support the credential type
>> [UsernamePasswordCredential(username=user, source=null, customFields={})].
>> Trying next...>
>> 2020-06-17 15:13:20,270 DEBUG
>> [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] -
>> <Authentication handler [OpenIdCredentialsAuthenticationHandler] does not
>> support the credential type [UsernamePasswordCredential(username=user,
>> source=null, customFields={})]. Trying next...>
>> 2020-06-17 15:13:20,270 DEBUG
>> [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] -
>> <Authentication handler [DelegatedClientAuthenticationHandler] does not
>> support the credential type [UsernamePasswordCredential(username=user,
>> source=null, customFields={})]. Trying next...>
>>
>> Any working password grant configuration or insight would be appreciated.
>>
>> Thanks,
>> -Gary
>>
> --
> - 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/58dcd216-6a20-431e-8b44-e2910a1be13bo%40apereo.org
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/58dcd216-6a20-431e-8b44-e2910a1be13bo%40apereo.org?utm_medium=email&utm_source=footer>
> .
>

-- 
- 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/CAHKHAzGe4Et7ThcK2RQAQOUA5DguJdbkCFF35Hd_mxVGM6W_pA%40mail.gmail.com.

Reply via email to