Dmitriy,

Thank you; much appreciated.

-Jeff

On Wed, Oct 21, 2020 at 3:10 PM Dmitriy Kopylenko <[email protected]>
wrote:

> Unfortunately, the documentation is not up to date. The API has changed.
> As you could see there is no HandlerResult type anymore:
> https://github.com/apereo/cas/blob/6.2.x/core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/handler/support/AbstractUsernamePasswordAuthenticationHandler.java#L120
>
> It’s called AuthenticationHandlerExecutionResult
>
> See if you could adopt your implementation to the latest API
>
> Best,
> D.
>
> On Oct 21, 2020 at 13:10:52, Jeffrey Ramsay <[email protected]>
> wrote:
>
>> Hello,
>>
>> I was following the code listed here.
>>
>>
>> https://apereo.github.io/cas/6.2.x/installation/Configuring-Custom-Authentication.html
>>
>> Also, I added the following to build.gradle:
>>
>>     implementation
>> "org.apereo.cas:cas-server-core-api-authentication:${casServerVersion}"
>>     implementation
>> "org.apereo.cas:cas-server-core-authentication-api:${casServerVersion}"
>>     implementation
>> "org.apereo.cas:cas-server-support-generic:${casServerVersion}"
>>     implementation
>> "org.apereo.cas:cas-server-support-actions:${casServerVersion}"
>>     implementation
>> "org.apereo.cas:cas-server-core-authentication:${casServerVersion}"
>>     implementation
>> "org.apereo.cas:cas-server-core-authentication-attributes:${casServerVersion}"
>>     implementation
>> "org.apereo.cas:cas-server-core-services-authentication:${casServerVersion}"
>>     implementation
>> "org.apereo.cas:cas-server-core-configuration:${casServerVersion}"
>>     implementation
>> "org.apereo.cas:cas-server-core-configuration-api:${casServerVersion}"
>>
>> And the code I'm testing.
>>
>> package com.example.cas;
>>
>> import
>> org.apereo.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler;
>> import
>> org.apereo.cas.authentication.credential.UsernamePasswordCredential;
>> import org.apereo.cas.authentication.principal.PrincipalFactory;
>> import org.apereo.cas.authentication.PreventedException;
>> import org.apereo.cas.services.ServicesManager;
>> import org.apereo.cas.authentication.Credential;
>> import java.security.GeneralSecurityException;
>>
>> import org.apereo.cas.authentication.principal.Principal;
>>
>> public class MyAuthenticationHandler extends
>> AbstractUsernamePasswordAuthenticationHandler {
>>
>>     public MyAuthenticationHandler(String name, ServicesManager
>> servicesManager, PrincipalFactory principalFactory, Integer order) {
>>         super(name, servicesManager, principalFactory, order);
>>     }
>>
>>     @Override
>>     protected HandlerResult authenticateUsernamePasswordInternal(
>>                                                                  final
>> UsernamePasswordCredential credential,
>>                                                                  final
>> String originalPassword) {
>>         return createHandlerResult(credential,
>> this.principalFactory.createPrincipal(username), null);
>>     }
>> }
>>
>> -Jeff
>>
>> On Wed, Oct 21, 2020 at 10:05 AM Dmitriy Kopylenko <[email protected]>
>> wrote:
>>
>>> Hi there.
>>>
>>> Which stub code example?
>>>
>>> You’d want to make sure you implement the correct SPI for
>>> AuthenticationHandler, which is this:
>>> https://github.com/apereo/cas/blob/6.2.x/api/cas-server-core-api-authentication/src/main/java/org/apereo/cas/authentication/AuthenticationHandler.java
>>>
>>> Best,
>>> D.
>>>
>>> On Oct 21, 2020 at 09:46:17, Jeffrey Ramsay <[email protected]>
>>> wrote:
>>>
>>>> Hello -
>>>>
>>>> I am trying to build an authentication handler in cas 6.2 using the
>>>> stub code from the example and cannot get past the following error message.
>>>>
>>>> Does anyone know if this is no longer valid? or where I can find the
>>>> module where this class is defined?
>>>>
>>>> error: cannot find symbol
>>>> import org.apereo.cas.authentication.HandlerResult;
>>>>                                     ^
>>>>   symbol:   class HandlerResult
>>>>   location: package org.apereo.cas.authentication
>>>>
>>>> Thanks,
>>>> -Jeff
>>>>
>>>> --
>>>> - 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/CA%2BTBYOSeMy3naZ_J7_v%2B2BZFmMBF1x3mV1o68OvtyKjr%3Dd2T2w%40mail.gmail.com
>>>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/CA%2BTBYOSeMy3naZ_J7_v%2B2BZFmMBF1x3mV1o68OvtyKjr%3Dd2T2w%40mail.gmail.com?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/CAMpiYKh6Gjy8a5mEgogiuYQB9hu%2Bgxp7r7hPLTD7fToh3ysPFw%40mail.gmail.com
>>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAMpiYKh6Gjy8a5mEgogiuYQB9hu%2Bgxp7r7hPLTD7fToh3ysPFw%40mail.gmail.com?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/CA%2BTBYOT9tKXogSqS%3DirEmEg-B1xGibR658Fp4Yy2QpQz179Mqg%40mail.gmail.com
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/CA%2BTBYOT9tKXogSqS%3DirEmEg-B1xGibR658Fp4Yy2QpQz179Mqg%40mail.gmail.com?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/CAMpiYKhww512UOXbJrZo02T%3D4ATMQdxWrAT2NH55M6yoO0AC2w%40mail.gmail.com
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAMpiYKhww512UOXbJrZo02T%3D4ATMQdxWrAT2NH55M6yoO0AC2w%40mail.gmail.com?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/CA%2BTBYOSptmzs%2B%3D%2BQa%3DwQqs3AGeZwZAkOuG%2BR%2BtybsU3bkLNKVw%40mail.gmail.com.

Reply via email to