Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
saikrishnan
Posts: 13
Registered: ‎02-06-2014
My Device: Z10

User authentication in to application using bbid Identity Service Provider

Hi all,

Can any one knows how to authenticate a user in the application using bbid service? And how to use requestToken() method in IdentityServiceProvider class?

New Developer
saikrishnan
Posts: 13
Registered: ‎02-06-2014
My Device: Z10

Re: User authentication in to application using bbid Identity Service Provider

When i call the requestToken() function in IdentityServiceProviderit is getting faild and giving IdentityServiceTokenResult::Type  as 5009 (/*!< This error may be returned with the requestToken() function,
         and indicates that the identity provider is unable to determine
         the application or service that the token applies to.  This
         error is specific to the identity provider. */)

 

How to get the token for bb identity service?

Retired
garydev
Posts: 83
Registered: ‎10-10-2012
My Device: Z30

Re: User authentication in to application using bbid Identity Service Provider

saikrishnan,

 

>Can any one knows how to authenticate a user in the application using bbid service?

 

okay - for starters - have you reviewed the content of this page?

 

https://developer.blackberry.com/native/reference/core/com.qnx.doc.idservice.lib_ref/topic/manual/id...

 

Have you written any code to try to do this yet?

 

>And how to use requestToken() method in IdentityServiceProvider class?

 

What have you done?  Can you show me your code?

 

-g

Retired
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10

Re: User authentication in to application using bbid Identity Service Provider

Hi,

 

You probably don't need to get a token from the available providers. (Why do you want it?)

 

Have you reviewed https://github.com/blackberry/Cascades-Community-Samples/tree/master/IdentityService ?

   

Thanks.

--
Rob is no longer associated with BlackBerry.
New Developer
saikrishnan
Posts: 13
Registered: ‎02-06-2014
My Device: Z10

Re: User authentication in to application using bbid Identity Service Provider

[ Edited ]

@, @

i'm using the sample code given in this url

http://developer.blackberry.com/native/reference/cascades/bb__platform__identity__blackberryid.html


and also i'm calling the provider->challenge(BlackBerryIdChallengeType::Authenticate,BlackBerryIdChallengeFlag::smileyvery-happy:efault) for verifying bbid credentials before login to my application.

 

and can we get any unique token for every login(means for every challenge we did) authentication? like we get in facebook 3rd party login authentication

Retired
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10

Re: User authentication in to application using bbid Identity Service Provider

Hi,

 

A BlackBerry ID token is only useful if you have a BlackBerry service (application / server side) to validate against.

 

Thanks.

 

 

--
Rob is no longer associated with BlackBerry.
New Developer
saikrishnan
Posts: 13
Registered: ‎02-06-2014
My Device: Z10

Re: User authentication in to application using bbid Identity Service Provider

Hi robbieDubya,

Can you explain it more about token and blackberry service?

Retired
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10

Re: User authentication in to application using bbid Identity Service Provider

[ Edited ]

Hi,

 

The tokens prove the BlackBerry ID is valid - to BlackBerry.

 

eg: in theory you could use the token to prove to the BlackBerry World Web Server that you are that BlackBerry ID - but there's no service like this exposed...

 

If there was ever a FaceBook IDS provider - it could generate tokens that you can present to FaceBook services to prove you have access to that account. (Right now - you'd use Web...)

 

Hope that is clear... :smileyfrustrated:

 

Thanks!

 

 

--
Rob is no longer associated with BlackBerry.
New Developer
saikrishnan
Posts: 13
Registered: ‎02-06-2014
My Device: Z10

Re: User authentication in to application using bbid Identity Service Provider

[ Edited ]

Hi robbieDubya,

Thanks for your support on this topic ,

 

Finally I'm able get the properties(ids_get_properties()) and challenge(ids_challenge() ) with BLACKBERRY_ID_PROVIDER as provider but  I'm getting error in the following function calling

 

When I call  the following function in identity service with BLACKBERRY_ID_PROVIDER as provider I'm getting error:  50009  (IDS_UNKNOWN_APPLIES_TO = 50009)

ids_get_token( ids_provider_t* provider, const char* token_type, const char* applies_to, get_token_cb_t success_cb,      failure_cb_t failure_cb, void* cb_data, ids_request_id_t* request_id );

 

code I written: ids_get_token(m_idsProvider, "mytoken","myapplication" ,handleToken, failure, this, &m_requestId)

 

here for applies_to  parameter I have tried urn:token:myapplication also (got from http://blackberry-webworks.github.io/WebWorks-API-Docs/WebWorks-API-Docs-next-bbid/view/blackberry.u...

 

if you don't mind could you please help me on this what we have to pass for token_type and applies_to parameters? :smileyhappy:

Retired
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10

Re: User authentication in to application using bbid Identity Service Provider

Hi,

 

I'll ask the development team for input on this.

 

Thank you!

--
Rob is no longer associated with BlackBerry.