-
Notifications
You must be signed in to change notification settings - Fork 0
Open GDPR Discovery
Can Soykarafakılı edited this page Aug 30, 2018
·
6 revisions
The Discovery Endpoint of the Open GDPR API specification returns the identity and request types supported by the server and a download link to the public key that can be used to validate the Signature received on the response headers.
To make a request to the Discovery Endpoint, endpoint you should use OpenGDPRDiscoveryClient.
Objective-C:
#import "OpenGDPRDiscoveryClient.h"
@interface ViewController () <OpenGDPRDiscoveryDelegate>
...
....
....
...
@end
...
....
OpenGDPRDiscoveryClient *client = [[OpenGDPRDiscoveryClient alloc] init];
[client fetchDiscoveryDataWithDelegate:self];
....
...Swift:
...
....
let client = OpenGDPRDiscoveryClient()
client.fetchDiscoveryData(with: self)
....
...Objective-C:
#pragma mark OpenGDPRDiscoveryDelegate
- (void)success:(DiscoveryResponseModel *)model
{
// Handle success here
}
- (void)fail:(NSError *)error
{
// Handle fail here
}Swift:
extension ViewController : OpenGDPRDiscoveryDelegate
{
func success(_ model: DiscoveryResponseModel!)
{
// Handle success here
}
func fail(_ error: Error!)
{
// Handle fail here
}
}Up to the current version the client is not caching the certificate that this endpoint receives, therefore it needs to be cached in memory if the response signature will be checked.