Authorization Property
An OAuth Authorization String.
Syntax
ANSI (Cross Platform) char* GetAuthorization();
int SetAuthorization(const char* lpszAuthorization); Unicode (Windows) LPWSTR GetAuthorization();
INT SetAuthorization(LPCWSTR lpszAuthorization);
@property (nonatomic,readwrite,assign,getter=authorization,setter=setAuthorization:) NSString* authorization; - (NSString*)authorization; - (void)setAuthorization:(NSString*)newAuthorization;
#define PID_GMAIL_AUTHORIZATION 2 CLOUDMAIL_EXTERNAL void* CLOUDMAIL_CALL CloudMail_GMail_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal); CLOUDMAIL_EXTERNAL int CLOUDMAIL_CALL CloudMail_GMail_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
Default Value
""
Remarks
This property is used to specify an OAuth authorization string. Setting it is a requirement for using the component.
Example
Oauth oauth = new Oauth(); oauth.ClientId = "3c65828c-6376-4286-91b5-2381c3904a97"; oauth.ClientSecret = "mkk2a2M-B5TQI7o5p_N0fR-CHYVn7e3yH~"; oauth.ServerAuthURL = "https://accounts.google.com/o/oauth2/auth"; oauth.ServerTokenURL = "https://accounts.google.com/o/oauth2/token"; oauth.AuthorizationScope = "https://www.googleapis.com/auth/gmail.readonly"; oauth.GrantType = OauthGrantTypes.ogtAuthorizationCode; gmail.Authorization = oauth.GetAuthorization();
This property is not available at design time.
Data Type
String