What framework and classes would I need to use in iOS in order to sign up and log in to a web app on a remote server? I think I have to use a url session object, but how do I actually handle the user sign up and log in? Would I also need to use REST API?
Replies
how do I actually handle the user sign up and log in?
That depends on the server itself. For example:
If the server supports HTTP-style authentication (Basic, Digest, and so on), you’d handle that via the task authentication challenge mechanism.
If the server uses TLS mutual authentication, you’d handle that via the session authentication challenge mechanism.
Many web services require you to supply an API key via an HTTP header, a URL parameter, or in the HTTP body.
Many user-facing web sites authenticate using cookies.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
So what framework and classes do I need to use? I received an answer to use the URLSession class in a previous similar question I posted that was more narrowly defined than this question. Is that the only option to use for each of the answers you gave?
So what framework and classes do I need to use?
What authentication mechanism does this server use?
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
I am using REST API. The GET, to be exact.
I am using REST API.
Right, but that doesn’t explain how the server authenticates requests. If you want help implementing that authentication scheme, you’ll need to provide details on what that scheme is.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
I'm unfamiliar with what a scheme is.
I found this in this link: docops.ca.com/ca-single-sign-on/12-52-sp1/en/configuring/policy-server-configuration/authentication-schemes#AuthenticationSchemes-SupportedAuthenticationSchemesandPasswordPolicies. I'm new to this. I believe I need to use a password. Is there one you would recommend that would work well within an iOS context? I don't want the user interface to be a web browser.
The following table lists supported authentication scheme types and whether they support Password Policies.
Anonymous | No |
Basic | Yes |
Basic over SSL | Yes |
Custom | Yes |
HTML Forms | Yes |
Impersonation | No |
OAuth | No |
OpenID | No |
RADIUS CHAP/PAP | Yes |
RADIUS Server | Yes |
SafeWord | No |
SafeWord and HTML Forms | No |
SecurID | No |
SecurID and HTML Forms | No |
X.509 Client Certificate | No |
X.509 Client Certificate and Basic | Yes |
X.509 Client Certificate or Basic | Yes |
X.509 Client Certificate and HTML Forms | Yes |
X.509 Client Certificate or HTML Forms | Yes |
Windows Authentication | Yes |
I think it would be enough just to use a username and a password, without any sort of confirmation.
That table seems to indicate that the server supports HTTP Basic authentication. If so, you should be able to authenticate via the authenticate challenge mechanism. See Handling an Authentication Challenge.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"