SPIDlibraryAndroid
SPIDlibraryAndroid is a library for logging in via SPID through several different identity providers.
Requirements
- Android 4.4+
Usage
- Add dependency to your project:
- Declare a variable to register the
IdentityProviderSelectorActivityContract
contract using theregisterForActivityResult(I)
method which will give aSpidResult
object as a return value:
The SpidResult
object consists of a SpidEvent
object and an optional SpidResponse
object. The SpidResponse
object is only available in case of successful login.
- Create a
SpidParams.Config
object containing theauthPageUrl
url, thecallbackPageUrl
url and an optional timeoutint
value (default value: 30sec):
- Use the
IdentityProvider.Builder()
builder to add the identity providers:
- Create a
SpidParams
object using the spidConfig and idpList objects and call theActivityResultLauncher.launch(I)
method:
License
SPIDlibraryAndroid is released under the BSD 3-Clause License. See LICENSE for details.