You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@fineract.apache.org by Achia Rolence <ak...@gmail.com> on 2022/06/13 09:37:33 UTC

Issues enabling OAuth on Fineract 1.7

Hello to all.
I deployed the latest release but enable Oauth and disabled basic
authentication. Can anyone help with how OAuth works? How to create tokens,
how to use tokens and where is the Auth server?
Thanks and regards
Rolence

Re: Issues enabling OAuth on Fineract 1.7

Posted by Achia Rolence <ak...@gmail.com>.
Hi Developers,
I have set up Keycloak server 1.8.0 and generated an Access token but every
request made to the server has the same response. Any help would be
appreciated to point me to the right direction.
{
    "developerMessage": "Invalid authentication details were passed in api
request.",
    "httpStatusCode": "401",
    "defaultUserMessage": "Unauthenticated. Please login.",
    "userMessageGlobalisationCode": "error.msg.not.authenticated",
    "errors": []
}

Below is the Keycloak Access token response
{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI1MGZoOEU5Q3R3NlZXbVRWbERxU3daOEtkSENKSEo5NUt6bWl4bUx1WnBjIn0.eyJleHAiOjE2NTU4MjAxODMsImlhdCI6MTY1NTgyMDEyMywianRpIjoiYmZmNzhlZDMtYWM1MS00MTFmLTk4NjQtOTBkYWU5NzY0NzJlIiwiaXNzIjoiaHR0cHM6Ly9rZXljbG9hay5sbmRkby5sb2FuOjg0NDMvcmVhbG1zL21hc3RlciIsImF1ZCI6WyJmaW5lcmFjdC1yZWFsbSIsIm1hc3Rlci1yZWFsbSIsImFjY291bnQiXSwic3ViIjoiYWRtaW4iLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJjb21tdW5pdHktYXBwIiwic2Vzc2lvbl9zdGF0ZSI6IjMyYjk0ZDEzLTU1OWMtNGRmYy04YWYwLTBkNzg0N2YwOGI5MSIsImFjciI6IjEiLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiY3JlYXRlLXJlYWxtIiwiZGVmYXVsdC1yb2xlcy1tYXN0ZXIiLCJvZmZsaW5lX2FjY2VzcyIsImFkbW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k0ZDEzLTU1OWMtNGRmYy04YWYwLTBkNzg0N2YwOGI5MSJ9.LiknFsEcd-qt5Nf6LgF-GS9hUK2UukVoO1KEBcbo7ec","token_type":"Bearer","not-before-policy":0,"session_state":"32b94d13-559c-4dfc-8af0-0d7847f08b91","scope":"profile
email"}

On Mon, Jun 13, 2022 at 2:27 PM Petri Tuomola <pe...@tuomola.org.invalid>
wrote:

> Hi
>
> That's actually the documentation for the pre-1.5 version Oauth that
> relied on the discontinued spring-security-oauth2 package.
>
> The documentation for the oauth support in the post-1.5 versions can be
> found here:
>
>
> https://github.com/apache/fineract/blob/develop/fineract-doc/src/docs/en/chapters/security/oauth.adoc
>
> Hope this helps!
>
> Regards
> Petri
>
>
> On Mon, Jun 13, 2022, 18:50 Awasum Yannick <aw...@apache.org> wrote:
>
>> Hi Rolence,
>>
>> Please check if the API Docs will help:
>> https://demo.mifos.io/api-docs/apiLive.htm#authenticationoauth
>>
>>
>>
>> On Mon, Jun 13, 2022 at 10:37 AM Achia Rolence <ak...@gmail.com>
>> wrote:
>>
>>> Hello to all.
>>> I deployed the latest release but enable Oauth and disabled basic
>>> authentication. Can anyone help with how OAuth works? How to create tokens,
>>> how to use tokens and where is the Auth server?
>>> Thanks and regards
>>> Rolence
>>>
>>

Re: Issues enabling OAuth on Fineract 1.7

Posted by Petri Tuomola <pe...@tuomola.org.INVALID>.
Hi

That's actually the documentation for the pre-1.5 version Oauth that relied
on the discontinued spring-security-oauth2 package.

The documentation for the oauth support in the post-1.5 versions can be
found here:

https://github.com/apache/fineract/blob/develop/fineract-doc/src/docs/en/chapters/security/oauth.adoc

Hope this helps!

Regards
Petri


On Mon, Jun 13, 2022, 18:50 Awasum Yannick <aw...@apache.org> wrote:

> Hi Rolence,
>
> Please check if the API Docs will help:
> https://demo.mifos.io/api-docs/apiLive.htm#authenticationoauth
>
>
>
> On Mon, Jun 13, 2022 at 10:37 AM Achia Rolence <ak...@gmail.com>
> wrote:
>
>> Hello to all.
>> I deployed the latest release but enable Oauth and disabled basic
>> authentication. Can anyone help with how OAuth works? How to create tokens,
>> how to use tokens and where is the Auth server?
>> Thanks and regards
>> Rolence
>>
>

Re: Issues enabling OAuth on Fineract 1.7

Posted by Awasum Yannick <aw...@apache.org>.
Hi Rolence,

Please check if the API Docs will help:
https://demo.mifos.io/api-docs/apiLive.htm#authenticationoauth



On Mon, Jun 13, 2022 at 10:37 AM Achia Rolence <ak...@gmail.com>
wrote:

> Hello to all.
> I deployed the latest release but enable Oauth and disabled basic
> authentication. Can anyone help with how OAuth works? How to create tokens,
> how to use tokens and where is the Auth server?
> Thanks and regards
> Rolence
>