Extract information from iOS applications on Mobile API Gateway
search cancel

Extract information from iOS applications on Mobile API Gateway

book

Article ID: 268558

calendar_today

Updated On:

Products

CA API Gateway CA Mobile API Gateway

Issue/Introduction

How to get the following details from an iOS app:

  1. Username
  2. Mag-identifier
  3. Client ID
  4. Client Secret

Note: In Android app,

  • “Username” is extracted from client certificate (fetch client certificate chain with client certificate itself at zeroth position).
  • “Client ID”, “Client Secret” could be “OAuth ClientID” and “OAuth Client Secret” respectively.
  • “Mag-identifier” is the device identifier assigned by MAG server on device registration.

Environment

Release : API Gateway 10.1

Mobile API Gateway 4.2

Resolution

1. Username:  [MASUser  currentUser].userName (Updates the user details from userInfo endpoint)
  • Client certificate has username only in the case of MASGrantFlowPassword.
  • Depending on what AuthCredentials are being used this differs.
  • Should avoid using ClientCertificate.
2. Mag-identifier: Secrete data (Stored in keychain and can not be accessed).
3. Client ID: Secrete data (Stored in keychain and can not be accessed).
  • Dynamic clients: Only Master Client ID is part of msso_config.json
  • Static clients: Client ID and Client Secrete are part of msso_config.json
4. Client Secret: Secrete data (Stored in keychain and can not be accessed).