dante
Sep 7th, 2011, 08:45 AM
Is it possible in OAuth 2 to use multiple grant types with the same client to connect to a provider? If so, what would the configuration look like, if I wanted to allow "authorization_code" and "client_credentials" for Tonr to access Sparklr and how can the client decide which grant type to use for a certain call?
To give you an idea why I want to do this: My client application should allow users to access certain resources on the provider via grant type "authorization_code", very similar to the Tonr/Sparklr example. Additionally there are timer based service tasks in the client that need read access to the resources of all users (some kind of admin work). Since theses tasks have to run in the background and cannot be triggered by a special admin user, I thought about using the grant type "client_credentials" (possibly with a different scope) to let client and provider authenticate directly for this.
Is this possible and if so, how? Or is there a better way to achieve this?
Best regards and thanks in advance
To give you an idea why I want to do this: My client application should allow users to access certain resources on the provider via grant type "authorization_code", very similar to the Tonr/Sparklr example. Additionally there are timer based service tasks in the client that need read access to the resources of all users (some kind of admin work). Since theses tasks have to run in the background and cannot be triggered by a special admin user, I thought about using the grant type "client_credentials" (possibly with a different scope) to let client and provider authenticate directly for this.
Is this possible and if so, how? Or is there a better way to achieve this?
Best regards and thanks in advance