00001 /* 00002 * (c) 2017 BlackBerry Limited. All rights reserved. 00003 * 00004 */ 00005 00006 #pragma once 00007 00008 #import <Foundation/Foundation.h> 00009 #import "GDPortability.h" 00010 00011 00012 GD_NS_ASSUME_NONNULL_BEGIN 00013 00026 @protocol GDAuthTokenDelegate 00027 00042 - (void)onGDAuthTokenSuccess:(NSString*)gdAuthToken; 00043 00067 - (void)onGDAuthTokenFailure:(NSError*) authTokenError; 00068 00069 @end 00170 @interface GDUtility : NSObject 00171 00205 - (void)getGDAuthToken: (NSString*) challenge serverName:(GD_NSNULLABLE NSString*) serverName; 00206 00217 @property (GD_NSNULLABLE_PROP weak, getter = getGDAuthDelegate, setter = setGDAuthDelegate:) id<GDAuthTokenDelegate> gdAuthDelegate; 00218 00219 00220 @end 00221 00233 extern NSString* const GDAuthTokenDomain; 00234 00235 00236 typedef NS_ENUM(NSInteger, GDAuthTokenError) 00237 { 00241 GDAuthTokenErrNotSupported = -2, 00242 00248 GDAuthTokenErrRetry = -1, 00249 00250 }; 00251 00255 GD_NS_ASSUME_NONNULL_END