High-level description of the Client Side Library calls

Mobile Connect button

The Client Side Library includes ClientSideAppFragment, that contains MobileConnect button
Click on this button should start following actions:

  • Attempt to get mobile network device IP
  • Attempt to get current SIM MCC/MNC
  • Attempt to get current SIM MSISDN
  • Send the request to the server side application with identified data
  • Perform redirects from the Server Side Application

After this actions completed - user should be authenticated on server side

High-level description of the SDK calls

Step 1: Discovery request

  • The attemptDiscovery method is used for the Discovery request and Provider Metadata request.
  • Discovery Service returns DiscoveryResponse and ProviderMetadata

Note: if you operate in the EU then you should use EU Discovery Service domain: eu.discover.mobileconnect.io

Step 2: Create Authorization requests

  • The startAuthentication method is used to create Authentication and Authorisation requests
  • The method returns a URL with required and optional parameters

Step 3: Authentication, Authorization, RequestToken, JWKS requests

  • The attemptAuthenticationWithWebView method is used to perform Authentication, Authorization, RequestToken, JWKS requests
  • Auth services returns RequestTokenResponse

Step 4: Identity and UserInfo request - optional

  • The requestIdentity and requestUserInfo methods are used for Identity and UserInfo requests
  • Identity and Userinfo services return IdentityResponse/Userinfo responses


Function calls to Native API calls


The attemptDiscovery call


attemptDiscovery response

DiscoveryResponse {
    Date ttl; - timestamp for Discovery API response expiring
    int responseCode; - Discovery API response code
    List<KeyValuePair> headers; - Discovery response headers
    ErrorResponse errorResponse; - Discovery error response
    DiscoveryResponseData responseData; - Discovery response data
    OperatorUrls operatorUrls; - Discovery response MNO endpoints
    String clientName; - Discovery response client name
    ProviderMetadata providerMetadata; - ProviderMetadata response (R2 only)


The startAuthentication call


startAuthentication response

mobileConnectStatus object returned startAuthentication example:

	MobileConnectStatus.ResponseType responseType; - API response type
	String errorCode; - null if no error in response, otherwise - contains error code
	String errorMessage; - null if no error in response, otherwise - contains error code
	String url; - authorization url if startAuthentication method call, null in other cases
	String state; - authorization request "state" parameter
	String nonce;  - authorization request "nonce" parameter
	List<String> setCookie; - response cookies
	String sdkSession; - cache key 
	DiscoveryResponse discoveryResponse; - response from Discovery API
	RequestTokenResponse requestTokenResponse; - response from Token API
	IdentityResponse identityResponse; - response from userinfo/identity api
	Exception exception; - exception details, null if no exception thrown


The attemptAuthenticationWithWebView call


requestIdentity / requestUserInfo


requestIdentity/requestUserinfo response

mobileConnectStatus object returned requestIdentity/requestUserinfo

IdentityResponse {
    int responseCode; - Identity/Userinfo API response code
    ErrorResponse errorResponse; - Identity/Userinfo API error response
    String responseJson; - Identity/Userinfo API response as string
    Object convertedResponseData; - Identity/Userinfo API response as object - could be casted to UserinfoData/IdentityData objects