mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-28 19:05:49 +00:00
add URL for HockeyApps identification site to public interface
This commit is contained in:
parent
b22a42101e
commit
4f4ed09cd4
@ -220,6 +220,12 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
||||
*/
|
||||
@property (nonatomic, strong) NSURL *webpageURL;
|
||||
|
||||
/**
|
||||
* URL to query the device's id via external webpage
|
||||
* Built with the baseURL set in `webpageURL`.
|
||||
*/
|
||||
- (NSURL*) deviceAuthenticationURL;
|
||||
|
||||
/**
|
||||
* The url-scheme used to idenfify via `BITAuthenticatorIdentificationTypeDevice`
|
||||
*
|
||||
|
||||
@ -479,9 +479,15 @@ static NSString* const kBITAuthenticatorAuthTokenTypeKey = @"BITAuthenticatorAut
|
||||
return authToken;
|
||||
}
|
||||
|
||||
- (NSURL *)deviceAuthenticationURL {
|
||||
return [self.webpageURL URLByAppendingPathComponent:[NSString stringWithFormat:@"apps/%@/authorize", self.encodedAppIdentifier]];
|
||||
}
|
||||
|
||||
- (void)authenticationViewControllerDidTapWebButton:(UIViewController *)viewController {
|
||||
NSURL *hockeyWebbasedLoginURL = [self.webpageURL URLByAppendingPathComponent:[NSString stringWithFormat:@"apps/%@/authorize", self.encodedAppIdentifier]];
|
||||
[[UIApplication sharedApplication] openURL:hockeyWebbasedLoginURL];
|
||||
NSURL *url = [self deviceAuthenticationURL];
|
||||
if(url) {
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL) handleOpenURL:(NSURL *) url
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user