How to implement Single Sign On on Android -
i implement single sign on on android.
i have set of mobile apps need speak server identify user.
when 1 of applications recognised belonging user, other apps should able detect that, without asking user further identification.
so user log in 1 application , other applications follow automatically.
please how achieve that?
you use central app sign-on, , call service other apps. sign-on management app should have service marked application-specific permission (see https://developer.android.com/guide/topics/manifest/permission-element.html), , should set android:protectionlevel
attribute signature
; example in android manifest:
<permission android:name="com.example.sso_access" android:protectionlevel="signature" />
and in android manifest:
<service android:enabled="true" android:exported="true" android:name=".singlesignonservice" android:permission="com.example.sso_access" > . . . </service>
this allow apps create communicate sign-on app's service, no other applications able to.
you should communicate service using standard android service techniques (bind service using bindservice()
appropriate intent - need appropriate intent filter service in manifest) - see android services guide information on this.
Comments
Post a Comment