Details
-
Type: extRequest
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:None
-
Sender Email:
-
HD-Chapter:Security
-
HD-Enabler:KeyRock
Description
Hi,
Part of our project is to implement a mobile native Android application.
Our question is if it is possible to use KeyRock so that our users could
potentially login with their Fiware account.
Other OAuth solutions like Google, provide a SDK for this, which prompts
users to Google Sign in.
Is there any user friendly way to achieve this with KeyRock?
To make it clear, the application will be written in Android Java and not
an HTML5 app.
Thank you,
Marios Protogiros
[Created via e-mail received from: Marios Protogiros <mariosprotos@gmail.com>]
Hi Marios,
No one has used Keyrock oauth from Android that I know and we don't have
any specific SDK for it, but it should be straightforward to implement it
using a generic library like this one
https://github.com/scribejava/scribejava (for example)
Follow the examples for other providers and modify them with Keyrock's urls:
https://github.com/scribejava/scribejava/wiki/FAQ#when-will-you-support-insert_api_here-
https://github.com/scribejava/scribejava/blob/master/scribejava-apis/src/main/java/com/github/scribejava/apis/GitHubApi.java
https://github.com/scribejava/scribejava/blob/master/scribejava-apis/src/test/java/com/github/scribejava/apis/examples/GitHubExample.java
On a side note, since you are implementing oauth2 on a mobile app, apart
from the Authorization Code Grant you can also take a look at the Resource
Owner Credentials Grant, to avoid the redirection, although this will
require the users of your app to trust you giving you your password.
Best regards,
Enrique
On Mon, 23 Nov 2015 at 16:19 Marios Protogiros <mariosprotos@gmail.com>