AppAuth
Instance Methods | Properties | List of all members
OIDServiceDiscovery Class Reference

Represents an OpenID Connect 1.0 Discovery Document. More...

#import <OIDServiceDiscovery.h>

Inheritance diagram for OIDServiceDiscovery:

Instance Methods

(nullable instancetype) - initWithJSON:error:
 Decodes a OpenID Connect Discovery 1.0 JSON document. More...
 
(nullable instancetype) - initWithJSONData:error:
 Decodes a OpenID Connect Discovery 1.0 JSON document. More...
 
(nullable instancetype) - initWithDictionary:error:
 Designated initializer. The dictionary keys should match the keys defined in the OpenID Connect Discovery 1.0 standard for OpenID Provider Metadata. More...
 

Properties

NSDictionary< NSString *, id > * discoveryDictionary
 The decoded OpenID Connect 1.0 Discovery Document as a dictionary.
 
NSURL * issuer
 REQUIRED. URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier. If Issuer discovery is supported, this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this Issuer. More...
 
NSURL * authorizationEndpoint
 REQUIRED. URL of the OP's OAuth 2.0 Authorization Endpoint. More...
 
NSURL * tokenEndpoint
 URL of the OP's OAuth 2.0 Token Endpoint. This is REQUIRED unless only the Implicit Flow is used. More...
 
NSURL * userinfoEndpoint
 RECOMMENDED. URL of the OP's UserInfo Endpoint. This URL MUST use the https scheme and MAY contain port, path, and query parameter components. More...
 
NSURL * jwksURL
 REQUIRED. URL of the OP's JSON Web Key Set document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. More...
 
NSURL * registrationEndpoint
 RECOMMENDED. URL of the OP's Dynamic Client Registration Endpoint. More...
 
NSArray< NSString * > * scopesSupported
 RECOMMENDED. JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported. More...
 
NSArray< NSString * > * responseTypesSupported
 REQUIRED. JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. More...
 
NSArray< NSString * > * responseModesSupported
 OPTIONAL. JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports, as specified in OAuth 2.0 Multiple Response Type Encoding Practices. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"]. More...
 
NSArray< NSString * > * grantTypesSupported
 OPTIONAL. JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"]. More...
 
NSArray< NSString * > * acrValuesSupported
 OPTIONAL. JSON array containing a list of the Authentication Context Class References that this OP supports. More...
 
NSArray< NSString * > * subjectTypesSupported
 REQUIRED. JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. More...
 
NSArray< NSString * > * IDTokenSigningAlgorithmValuesSupported
 REQUIRED. JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow). More...
 
NSArray< NSString * > * IDTokenEncryptionAlgorithmValuesSupported
 OPTIONAL. JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. More...
 
NSArray< NSString * > * IDTokenEncryptionEncodingValuesSupported
 OPTIONAL. JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT. More...
 
NSArray< NSString * > * userinfoSigningAlgorithmValuesSupported
 OPTIONAL. JSON array containing a list of the JWS signing algorithms (alg values) supported by the UserInfo Endpoint to encode the Claims in a JWT. The value none MAY be included. More...
 
NSArray< NSString * > * userinfoEncryptionAlgorithmValuesSupported
 OPTIONAL. JSON array containing a list of the JWE encryption algorithms (alg values) supported by the UserInfo Endpoint to encode the Claims in a JWT. More...
 
NSArray< NSString * > * userinfoEncryptionEncodingValuesSupported
 OPTIONAL. JSON array containing a list of the JWE encryption algorithms (enc values) supported by the UserInfo Endpoint to encode the Claims in a JWT. More...
 
NSArray< NSString * > * requestObjectSigningAlgorithmValuesSupported
 OPTIONAL. JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256. More...
 
NSArray< NSString * > * requestObjectEncryptionAlgorithmValuesSupported
 OPTIONAL. JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. More...
 
NSArray< NSString * > * requestObjectEncryptionEncodingValuesSupported
 OPTIONAL. JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference. More...
 
NSArray< NSString * > * tokenEndpointAuthMethodsSupported
 OPTIONAL. JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic – the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0. More...
 
NSArray< NSString * > * tokenEndpointAuthSigningAlgorithmValuesSupported
 OPTIONAL. JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used. More...
 
NSArray< NSString * > * displayValuesSupported
 OPTIONAL. JSON array containing a list of the display parameter values that the OpenID Provider supports. These values are described in Section 3.1.2.1 of OpenID Connect Core 1.0. More...
 
NSArray< NSString * > * claimTypesSupported
 OPTIONAL. JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0. Values defined by this specification are normal, aggregated, and distributed. If omitted, the implementation supports only normal Claims. More...
 
NSArray< NSString * > * claimsSupported
 RECOMMENDED. JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. More...
 
NSURL * serviceDocumentation
 OPTIONAL. URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation. More...
 
NSArray< NSString * > * claimsLocalesSupported
 OPTIONAL. Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 language tag values. Not all languages and scripts are necessarily supported for all Claim values. More...
 
NSArray< NSString * > * UILocalesSupported
 OPTIONAL. Languages and scripts supported for the user interface, represented as a JSON array of BCP47 language tag values. More...
 
BOOL claimsParameterSupported
 OPTIONAL. Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false. More...
 
BOOL requestParameterSupported
 OPTIONAL. Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false. More...
 
BOOL requestURIParameterSupported
 OPTIONAL. Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is true. More...
 
BOOL requireRequestURIRegistration
 OPTIONAL. Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. Pre-registration is REQUIRED when the value is true. If omitted, the default value is false. More...
 
NSURL * OPPolicyURI
 OPTIONAL. URL that the OpenID Provider provides to the person registering the Client to read about the OP's requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given. More...
 
NSURL * OPTosURI
 OPTIONAL. URL that the OpenID Provider provides to the person registering the Client to read about OpenID Provider's terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given. More...
 

Detailed Description

Represents an OpenID Connect 1.0 Discovery Document.

See also
https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata

Method Documentation

- (nullable instancetype) initWithDictionary: (NSDictionary *)  serviceDiscoveryDictionary
error: (NSError **_Nullable)  NS_DESIGNATED_INITIALIZER 

Designated initializer. The dictionary keys should match the keys defined in the OpenID Connect Discovery 1.0 standard for OpenID Provider Metadata.

Parameters
serviceDiscoveryDictionaryA dictionary representing an OpenID Connect Service Discovery document.
errorIf a required field is missing from the dictionary, an error with domain OIDGeneralErrorDomain and code OIDErrorCodeInvalidDiscoveryDocument will be returned.
- (nullable instancetype) initWithJSON: (NSString *)  serviceDiscoveryJSON
error: (NSError **_Nullable)  error 

Decodes a OpenID Connect Discovery 1.0 JSON document.

Parameters
serviceDiscoveryJSONAn OpenID Connect Service Discovery document.
errorIf a required field is missing from the dictionary, an error with domain OIDGeneralErrorDomain and code OIDErrorCodeInvalidDiscoveryDocument will be returned.
- (nullable instancetype) initWithJSONData: (NSData *)  serviceDiscoveryJSONData
error: (NSError **_Nullable)  error 

Decodes a OpenID Connect Discovery 1.0 JSON document.

Parameters
serviceDiscoveryJSONDataAn OpenID Connect Service Discovery document.
errorIf a required field is missing from the dictionary, an error with domain OIDGeneralErrorDomain and code OIDErrorCodeInvalidDiscoveryDocument will be returned.

Property Documentation

- (NSArray<NSString *>*) acrValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the Authentication Context Class References that this OP supports.

Remarks
acr_values_supported
- (NSURL*) authorizationEndpoint
readnonatomicassign

REQUIRED. URL of the OP's OAuth 2.0 Authorization Endpoint.

Remarks
authorization_endpoint http://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint
- (NSArray<NSString *>*) claimsLocalesSupported
readnonatomicassign

OPTIONAL. Languages and scripts supported for values in Claims being returned, represented as a JSON array of BCP47 language tag values. Not all languages and scripts are necessarily supported for all Claim values.

Remarks
claims_locales_supported http://tools.ietf.org/html/rfc5646
- (BOOL) claimsParameterSupported
readnonatomicassign

OPTIONAL. Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. If omitted, the default value is false.

Remarks
claims_parameter_supported
- (NSArray<NSString *>*) claimsSupported
readnonatomicassign

RECOMMENDED. JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.

Remarks
claims_supported
- (NSArray<NSString *>*) claimTypesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the Claim Types that the OpenID Provider supports. These Claim Types are described in Section 5.6 of OpenID Connect Core 1.0. Values defined by this specification are normal, aggregated, and distributed. If omitted, the implementation supports only normal Claims.

Remarks
claim_types_supported http://openid.net/specs/openid-connect-core-1_0.html
- (NSArray<NSString *>*) displayValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the display parameter values that the OpenID Provider supports. These values are described in Section 3.1.2.1 of OpenID Connect Core 1.0.

Remarks
display_values_supported http://openid.net/specs/openid-connect-core-1_0.html
- (NSArray<NSString *>*) grantTypesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. Dynamic OpenID Providers MUST support the authorization_code and implicit Grant Type values and MAY support other Grant Types. If omitted, the default value is ["authorization_code", "implicit"].

Remarks
grant_types_supported
- (NSArray<NSString *>*) IDTokenEncryptionAlgorithmValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT.

Remarks
id_token_encryption_alg_values_supported https://tools.ietf.org/html/rfc7519
- (NSArray<NSString *>*) IDTokenEncryptionEncodingValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for the ID Token to encode the Claims in a JWT.

Remarks
id_token_encryption_enc_values_supported https://tools.ietf.org/html/rfc7519
- (NSArray<NSString *>*) IDTokenSigningAlgorithmValuesSupported
readnonatomicassign

REQUIRED. JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow).

Remarks
id_token_signing_alg_values_supported https://tools.ietf.org/html/rfc7519
- (NSURL*) issuer
readnonatomicassign

REQUIRED. URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier. If Issuer discovery is supported, this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this Issuer.

Remarks
issuer https://openid.net/specs/openid-connect-discovery-1_0.html#IssuerDiscovery
- (NSURL*) jwksURL
readnonatomicassign

REQUIRED. URL of the OP's JSON Web Key Set document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.

Remarks
jwks_uri http://tools.ietf.org/html/rfc7517
- (NSURL*) OPPolicyURI
readnonatomicassign

OPTIONAL. URL that the OpenID Provider provides to the person registering the Client to read about the OP's requirements on how the Relying Party can use the data provided by the OP. The registration process SHOULD display this URL to the person registering the Client if it is given.

Remarks
op_policy_uri
- (NSURL*) OPTosURI
readnonatomicassign

OPTIONAL. URL that the OpenID Provider provides to the person registering the Client to read about OpenID Provider's terms of service. The registration process SHOULD display this URL to the person registering the Client if it is given.

Remarks
op_tos_uri
- (NSURL*) registrationEndpoint
readnonatomicassign

RECOMMENDED. URL of the OP's Dynamic Client Registration Endpoint.

Remarks
registration_endpoint http://openid.net/specs/openid-connect-registration-1_0.html
- (NSArray<NSString *>*) requestObjectEncryptionAlgorithmValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the JWE encryption algorithms (alg values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

Remarks
request_object_encryption_alg_values_supported
- (NSArray<NSString *>*) requestObjectEncryptionEncodingValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the JWE encryption algorithms (enc values) supported by the OP for Request Objects. These algorithms are used both when the Request Object is passed by value and when it is passed by reference.

Remarks
request_object_encryption_enc_values_supported
- (NSArray<NSString *>*) requestObjectSigningAlgorithmValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects, which are described in Section 6.1 of OpenID Connect Core 1.0. These algorithms are used both when the Request Object is passed by value (using the request parameter) and when it is passed by reference (using the request_uri parameter). Servers SHOULD support none and RS256.

Remarks
request_object_signing_alg_values_supported http://openid.net/specs/openid-connect-core-1_0.html
- (BOOL) requestParameterSupported
readnonatomicassign

OPTIONAL. Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. If omitted, the default value is false.

Remarks
request_parameter_supported
- (BOOL) requestURIParameterSupported
readnonatomicassign

OPTIONAL. Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. If omitted, the default value is true.

Remarks
request_uri_parameter_supported
- (BOOL) requireRequestURIRegistration
readnonatomicassign

OPTIONAL. Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. Pre-registration is REQUIRED when the value is true. If omitted, the default value is false.

Remarks
require_request_uri_registration
- (NSArray<NSString *>*) responseModesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports, as specified in OAuth 2.0 Multiple Response Type Encoding Practices. If omitted, the default for Dynamic OpenID Providers is ["query", "fragment"].

Remarks
response_modes_supported http://openid.net/specs/oauth-v2-multiple-response-types-1_0.html
- (NSArray<NSString *>*) responseTypesSupported
readnonatomicassign

REQUIRED. JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values.

Remarks
response_types_supported
- (NSArray<NSString *>*) scopesSupported
readnonatomicassign

RECOMMENDED. JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in [OpenID.Core] SHOULD be listed, if supported.

Remarks
scopes_supported http://tools.ietf.org/html/rfc6749#section-3.3
- (NSURL*) serviceDocumentation
readnonatomicassign

OPTIONAL. URL of a page containing human-readable information that developers might want or need to know when using the OpenID Provider. In particular, if the OpenID Provider does not support Dynamic Client Registration, then information on how to register Clients needs to be provided in this documentation.

Remarks
service_documentation
- (NSArray<NSString *>*) subjectTypesSupported
readnonatomicassign

REQUIRED. JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public.

Remarks
subject_types_supported
- (NSURL*) tokenEndpoint
readnonatomicassign

URL of the OP's OAuth 2.0 Token Endpoint. This is REQUIRED unless only the Implicit Flow is used.

Remarks
token_endpoint http://openid.net/specs/openid-connect-core-1_0.html#TokenEndpoint
- (NSArray<NSString *>*) tokenEndpointAuthMethodsSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0. Other authentication methods MAY be defined by extensions. If omitted, the default is client_secret_basic – the HTTP Basic Authentication Scheme specified in Section 2.3.1 of OAuth 2.0.

Remarks
token_endpoint_auth_methods_supported http://openid.net/specs/openid-connect-core-1_0.html http://tools.ietf.org/html/rfc6749#section-2.3.1
- (NSArray<NSString *>*) tokenEndpointAuthSigningAlgorithmValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint for the signature on the JWT used to authenticate the Client at the Token Endpoint for the private_key_jwt and client_secret_jwt authentication methods. Servers SHOULD support RS256. The value none MUST NOT be used.

Remarks
token_endpoint_auth_signing_alg_values_supported https://tools.ietf.org/html/rfc7519
- (NSArray<NSString *>*) UILocalesSupported
readnonatomicassign

OPTIONAL. Languages and scripts supported for the user interface, represented as a JSON array of BCP47 language tag values.

Remarks
ui_locales_supported http://tools.ietf.org/html/rfc5646
- (NSArray<NSString *>*) userinfoEncryptionAlgorithmValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the JWE encryption algorithms (alg values) supported by the UserInfo Endpoint to encode the Claims in a JWT.

Remarks
userinfo_encryption_alg_values_supported https://tools.ietf.org/html/rfc7516 https://tools.ietf.org/html/rfc7518 https://tools.ietf.org/html/rfc7519
- (NSArray<NSString *>*) userinfoEncryptionEncodingValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the JWE encryption algorithms (enc values) supported by the UserInfo Endpoint to encode the Claims in a JWT.

Remarks
userinfo_encryption_enc_values_supported https://tools.ietf.org/html/rfc7519
- (NSURL*) userinfoEndpoint
readnonatomicassign

RECOMMENDED. URL of the OP's UserInfo Endpoint. This URL MUST use the https scheme and MAY contain port, path, and query parameter components.

Remarks
userinfo_endpoint http://openid.net/specs/openid-connect-core-1_0.html#UserInfo
- (NSArray<NSString *>*) userinfoSigningAlgorithmValuesSupported
readnonatomicassign

OPTIONAL. JSON array containing a list of the JWS signing algorithms (alg values) supported by the UserInfo Endpoint to encode the Claims in a JWT. The value none MAY be included.

Remarks
userinfo_signing_alg_values_supported https://tools.ietf.org/html/rfc7515 https://tools.ietf.org/html/rfc7518 https://tools.ietf.org/html/rfc7519

The documentation for this class was generated from the following file: