Endpoint Overrides
HYPR SDK for iOS
Redirecting Relying Party Network Requests
This feature allows developers to override different endpoints to be sent to the HYPR Server for registration, authentication, and deregistration. Overriding specific endpoints will make it so your custom endpoints are used instead of the defaults during registration, authentication, and deregistration.
It is not necessary to provide a value for every property in HYPRRPAPIEndpoints
. If a value is not provided, the default endpoint will be used.
Not an Option
When overriding the API endpoints, it assumes that a
HYPRUserAgentProfile
profile is already registered.
Supported Endpoints
You can override only the following endpoints:
Parameter | Description | Example |
---|---|---|
initWithRegFidoGet | registration initialization endpoint | https://example.com/customRegFidoGet |
regFidoSend | registration endpoint | https://example.com/customRegFidoSend |
authFidoGet | authentication endpoint | https://example.com/customAuthFidoGet |
authFidoSend | authentication endpoint | https://example.com/customAuthFidoSend |
deregFidoGet | deregistration endpoint | https://example.com/customDeregFidoGet |
Implementation
- Create a
HYPRRPAPIEndpoints
object and provide the URL endpoints in the initializer. - Set the
HYPRRPAPIEndpoints
object to theHYPRUserAgent
relyingPartyAPIEndpoints
property. This will store the new endpoints in the current active profile and will be persisted within that profile.
Example
// Create the profile with the profile configuration
HYPRUserAgentProfile *profile = [[HYPRUserAgentProfile alloc] initWithDisplayName:@"<Your profile name goes here>" configuration: profileConfig persona: nil userAccounts: nil];
[[HYPRUserAgent sharedInstance] registerProfile: profile];
// Set the new HYPRRPAPIEndpoints for the current active profile
HYPRUserAgent *userAgent = HYPRUserAgent.sharedInstance;
userAgent.relyingPartyAPIEndpoints = [[HYPRRPAPIEndpoints alloc] initWithRegFidoGet:@"https://example.com/customRegFidoGet"
regFidoSend:@"https://example.com/customRegFidoSend"
authFidoGet:@"https://example.com/customAuthFidoGet"
authFidoSend:@"https://example.com/customAuthFidoSend"
deregFidoGet:@"https://example.com/customDeregFidoGet"];
Updated 11 months ago