ArcGIS Runtime SDK for iOS
100.15
|
OAuth details of an app.
Instances of this class contain the OAuth configuration details of an app that can sign into an ArcGIS Portal or ArcGIS Online using OAuth.
Instance Methods | |
(UIUserInterfaceStyle userInterfaceStyle) | - API_AVAILABLE |
(instancetype) | - initWithPortalURL:clientID:redirectURL: |
Class Methods | |
(instancetype) | + OAuthConfigurationWithPortalURL:clientID:redirectURL: |
Properties | |
NSString * | clientID |
NSLocale * | locale |
NSURL * | portalURL |
BOOL | prefersEphemeralWebBrowserSession |
NSString * | redirectURL |
NSInteger | refreshTokenExchangeInterval |
NSInteger | refreshTokenExpirationInterval |
BOOL | showCancelButton |
BOOL | showSocialLogins |
- (UIUserInterfaceStyle userInterfaceStyle) API_AVAILABLE | (ios(12.0)) |
Constants indicating the interface style for the OAuth login page. UIUserInterfaceStyleUnspecified - The system's interface style. UIUserInterfaceStyleLight - The light interface style. UIUserInterfaceStyleDark - The dark interface style.
UIUserInterfaceStyleUnspecified
- (instancetype) initWithPortalURL: | (nullable NSURL *) | portalURL | |
clientID: | (NSString *) | clientID | |
redirectURL: | (nullable NSString *) | redirectURL | |
Initialize the OAuth configuration with provided parameters
portalURL | The URL of the portal to authenticate with. This can be nil if you want to use the provided clientID and/or redirectURL for all portals |
clientID | Unique ID with which this application was registered with the portal. |
redirectURL | The URL that the OAuth login page will redirect to when authentication completes. For example, myapp://oauth/ . This URL must be registered with the portal when generating the clientID, and this application must declare that it can handle the URL. |
- application:openURL:options: (AGSApplicationDelegate)
if you are setting the redirectURL
. + (instancetype) OAuthConfigurationWithPortalURL: | (nullable NSURL *) | portalURL | |
clientID: | (NSString *) | clientID | |
redirectURL: | (nullable NSString *) | redirectURL | |
Initialize the OAuth configuration with provided parameters
portalURL | The URL of the portal to authenticate with. This can be nil if you want to use the provided clientID and/or redirectURL for all portals |
clientID | Unique ID with which this application was registered with the portal. |
redirectURL | The URL that the OAuth login page will redirect to when authentication completes. For example, myapp://oauth/ . This URL must be registered with the portal when generating the clientID, and this application must declare that it can handle the URL. |
- application:openURL:options: (AGSApplicationDelegate)
if you are setting the redirectURL
.
|
readnonatomiccopy |
Unquie ID with which this application was registered with the portal.
|
readwritenonatomicstrong |
The OAuth login page will display in the language specified by the given locale. If not explicitly set, NSLocale.currentLocale
is used. If the given locale is not supported by the portal or set to nil
, OAuth login page will display in the language corresponding to locale set in the portal/organization settings.
|
readnonatomicstrong |
The URL of the portal to authenticate with. For example, https://www.arcgis.com
|
readwritenonatomicassign |
A Boolean value that indicates whether the session should ask the browser for a private authentication session.
The default is NO
.
|
readnonatomiccopy |
The URL that the OAuth login page will redirect to when authentication completes. For example, myapp://oauth/
. The URL must be registered with the portal when generating the clientID, and this application must declare that it can handle the URL.
|
readwritenonatomicassign |
The requested exchange interval (in minutes) for the refreshToken generated by the OAuth request. If AGSOAuthConfiguration::refreshTokenExpirationInterval
is set to -1
then refreshToken is considered to be permanent. However, the portal/server allows the refreshToken to be valid for maximum 90 days only. In order for it to be permanent, refreshToken needs to exchanged every n
minutes. This property will be used only when AGSOAuthConfiguration::refreshTokenExpirationInterval
is set to -1
.
1440
minutes (1 day).0
or less than 0
then it will be set to default value 1440
minutes (1 day).129600
minutes (90 days) then it will be clamped to 129600
minutes (90 days).
|
readwritenonatomicassign |
The requested expiration interval (in minutes) for the refreshToken generated by the OAuth request. The max interval can be overridden by the portal administrator.
-1
.
|
readwritenonatomicassign |
Defaults to YES
. A "Cancel" button will be displayed next to "Sign In" on the OAuth web page. When clicked, the completion handler will be called with an NSUserCancelledError. If you want to hide the button then set to NO
.
|
readwritenonatomicassign |
Defaults to NO
. When set to YES
, options to use social logins (Facebook and Google+) will be displayed on the OAuth login page.