The Onegini SDK gives the end-developer the flexibility of being in control over building the requests and handling the responses. Therefore, it is your
responsibility to perform user authentication by calling
OneginiClient#UserClient#authenticateClient whenever a Resource Gateway responds with
401 unauthorized status code. Please refer to the user authentication topic guide to read more about user authentication.
DeviceClient#authenticateDevice method performs client authentication. The SDK uses client credentials to request an access token object,
which is used to perform anonymous resource calls.
In order to call the
authenticateDevice method two arguments have to be passed:
String scopes the client authentication is requested for,
OneginiDeviceAuthenticationHandler interface implementation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
When client authentication finishes successfully then
onSuccess method will be called. At this point, you can perform anonymous resource calls as described
in the next topic.