High-level description of the Server Side Library calls

Server Side Library call

The Client Side Library includes route /start_discovery, that could be called with following parameters

  • Call with mcc and mnc - this parameters in request leads user to MCC/MNC-based Discovery
    • Server Side should send response 302 Redirect to ID GW auth screen
    • User should enter his MSISDN
    • Server Side receive auth code and automatically send token request
    • User should be authenticated
  • Call with msisdn - this parameters in request leads user to MSISDN-based Discovery
    • Server Side should send response 302 Redirect to ID GW auth request
    • Server Side receive auth code and automatically send token request
    • User should be authenticated
  • Headers X-Forwarded-For, remoteAddr etc - this parameters in request leads user to IP-based Discovery
    • Server Side should send response 302 Redirect to ID GW auth screen
    • User should enter his MSISDN
    • Server Side receive auth code and automatically send token request
    • User should be authenticated
  • No query parameters - should lead user to Discovery UI flow
    • Server Side should send response 302 Redirect to Operator Selection screen
    • User should enter his MSISDN
    • Discovery Service send 302 Redirect to receive Discovery Response
    • Server Side receive Discovery Response and automatically send auth request to ID GW
    • Server Side receive auth code and automatically send token request
    • User should be authenticated

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

  • Application should redirect user to the URL, generated on Step 2

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

  • Schema is coming soon ...
  •  

    The AttemptDiscovery call

  • Schema is coming soon ...
  •  

    AttemptDiscovery response

    DiscoveryResponse {
        DateTime Ttl; - timestamp for Discovery API response expiring
        int ResponseCode; - Discovery API response code
        List<BasicKeyValuePair> Headers; - Discovery response headers
        ErrorResponse ErrorResponse; - Discovery error response
        DiscoveryResponseData ResponseData; - Discovery response data
        OperatorUrls OperatorUrls; - Discovery response MNO endpoints
        string ApplicationShortName; - Discovery response client name
        ProviderMetadata ProviderMetadata; - ProviderMetadata response (R2 only)
    }

     

    The StartAuthentication call

  • Schema is coming soon ...
  •  

    StartAuthentication response

    MobileConnectStatus object returned StartAuthentication example:

    MobileConnectStatus{
        MobileConnectResponseType 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
        IEnumerable<string> SetCookie; - response cookies
        string SDKSession; - cache key 
        DiscoveryResponse DiscoveryResponse; - response from Discovery API
        RequestTokenResponse TokenResponse; - response from Token API
        IdentityResponse IdentityResponse; - response from userinfo/identity api
        Exception Exception; - exception details, null if no exception thrown
    } 

     

    Send authentication request and request token

  • Schema is coming soon ...
  •  

    RequestIdentity / RequestUserInfo

  • Schema is coming soon ...
  •  

    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
    }