Thursday, 9 January 2020

How to implement Extensible Enterprise Single sign-on in ios13

We all know that Apple introduce Extensible Enterprise Single Sign-on Extension on iOS 13. Here is the demo video presented by Apple.

There are two types of Extension,

  1. Redirect and
  2. Credential

I want to work with Redirect Extension. The below code shown in demo video.

class ViewController: UIViewController {

var authController : ASAuthorizationController?
let authProvider = ASAuthorizationSingleSignOnProvider(identityProvider: URL(string: "https://example.com")!)

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view.
}
@IBAction func login(_ sender: Any) {
    if self.authProvider.canPerformAuthorization {
        let request = self.authProvider.createRequest()
        request.requestedOperation = ASAuthorization.OpenIDOperation.operationLogin
        self.authController = ASAuthorizationController(authorizationRequests: [request])
        self.authController?.delegate = self
        self.authController?.presentationContextProvider = self
        self.authController?.performRequests()
    } else {
        print("failed to perform authorization")
    }
}

}

How can I get the identity provider URL. So my question is that how to implement Redirect Extension in my app and how to add identity provider url.

Thanks in Advance.



from How to implement Extensible Enterprise Single sign-on in ios13

No comments:

Post a Comment