mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 11:25:38 +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;
|
@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`
|
* The url-scheme used to idenfify via `BITAuthenticatorIdentificationTypeDevice`
|
||||||
*
|
*
|
||||||
|
|||||||
@ -479,9 +479,15 @@ static NSString* const kBITAuthenticatorAuthTokenTypeKey = @"BITAuthenticatorAut
|
|||||||
return authToken;
|
return authToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSURL *)deviceAuthenticationURL {
|
||||||
|
return [self.webpageURL URLByAppendingPathComponent:[NSString stringWithFormat:@"apps/%@/authorize", self.encodedAppIdentifier]];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)authenticationViewControllerDidTapWebButton:(UIViewController *)viewController {
|
- (void)authenticationViewControllerDidTapWebButton:(UIViewController *)viewController {
|
||||||
NSURL *hockeyWebbasedLoginURL = [self.webpageURL URLByAppendingPathComponent:[NSString stringWithFormat:@"apps/%@/authorize", self.encodedAppIdentifier]];
|
NSURL *url = [self deviceAuthenticationURL];
|
||||||
[[UIApplication sharedApplication] openURL:hockeyWebbasedLoginURL];
|
if(url) {
|
||||||
|
[[UIApplication sharedApplication] openURL:url];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) handleOpenURL:(NSURL *) url
|
- (BOOL) handleOpenURL:(NSURL *) url
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user