Install using cocoapod
target '<your-app>' do
...
pod 'idemeum' # insert this line to your project's Podfile
...
end
We can now import idemeum iOS SDK. For this guide we will simply import the SDK to your view controller.
import idemeum
Initialize idemeum SDK instance. Use your clientId that you obtained from idemeum developer portal.
var objIdemeum: Idemeum!
objIdemeum = Idemeum(parentView: self, clientId: “<Place your client id here>”)
func isUserLoggedIn(){
objIdemeum.isLoggedIn(){(isLoggedin) in
if isLoggedin {
//User is logged in
}else {
//User is not logged in
}
}
}
func login(){
objIdemeum.login(){(isSuccess, mIdemeumResponse, error) in
if isSuccess, let response = mIdemeumResponse {
//Get here OIDC token.
}else {
//Show error
}
}
}
func renderUserClaims(){
objIdemeum.userClaims(){(isSuccess, result, error) in
if isSuccess, let stringResult = result {
//fetch user approved claims from JSON response
}else {
//Show error
}
}
}
objIdemeum.logout()
You can checkout the complete documentation guide here
You can reach us at [email protected]
This project uses the following license: MIT License