File indexing completed on 2025-01-19 03:55:38
0001 #ifndef O0GLOBALS_H 0002 #define O0GLOBALS_H 0003 0004 // Common constants 0005 const char O2_ENCRYPTION_KEY[] = "12345678"; 0006 const char O2_CALLBACK_URL[] = "http://127.0.0.1:%1/"; 0007 const char O2_MIME_TYPE_XFORM[] = "application/x-www-form-urlencoded"; 0008 const char O2_MIME_TYPE_JSON[] = "application/json"; 0009 0010 // QSettings key names 0011 const char O2_KEY_TOKEN[] = "token.%1"; 0012 const char O2_KEY_TOKEN_SECRET[] = "tokensecret.%1"; 0013 const char O2_KEY_CODE[] = "code.%1"; 0014 const char O2_KEY_EXPIRES[] = "expires.%1"; 0015 const char O2_KEY_REFRESH_TOKEN[] = "refreshtoken.%1"; 0016 const char O2_KEY_LINKED[] = "linked.%1"; 0017 const char O2_KEY_EXTRA_TOKENS[] = "extratokens.%1"; 0018 0019 // OAuth 1/1.1 Request Parameters 0020 const char O2_OAUTH_CALLBACK[] = "oauth_callback"; 0021 const char O2_OAUTH_CONSUMER_KEY[] = "oauth_consumer_key"; 0022 const char O2_OAUTH_NONCE[] = "oauth_nonce"; 0023 const char O2_OAUTH_SIGNATURE[] = "oauth_signature"; 0024 const char O2_OAUTH_SIGNATURE_METHOD[] = "oauth_signature_method"; 0025 const char O2_OAUTH_TIMESTAMP[] = "oauth_timestamp"; 0026 const char O2_OAUTH_VERSION[] = "oauth_version"; 0027 0028 // OAuth 1/1.1 Response Parameters 0029 const char O2_OAUTH_TOKEN[] = "oauth_token"; 0030 const char O2_OAUTH_TOKEN_SECRET[] = "oauth_token_secret"; 0031 const char O2_OAUTH_CALLBACK_CONFIRMED[] = "oauth_callback_confirmed"; 0032 const char O2_OAUTH_VERFIER[] = "oauth_verifier"; 0033 0034 // OAuth 2 Request Parameters 0035 const char O2_OAUTH2_RESPONSE_TYPE[] = "response_type"; 0036 const char O2_OAUTH2_CLIENT_ID[] = "client_id"; 0037 const char O2_OAUTH2_CLIENT_SECRET[] = "client_secret"; 0038 const char O2_OAUTH2_USERNAME[] = "username"; 0039 const char O2_OAUTH2_PASSWORD[] = "password"; 0040 const char O2_OAUTH2_REDIRECT_URI[] = "redirect_uri"; 0041 const char O2_OAUTH2_SCOPE[] = "scope"; 0042 const char O2_OAUTH2_GRANT_TYPE_CODE[] = "code"; 0043 const char O2_OAUTH2_GRANT_TYPE_TOKEN[] = "token"; 0044 const char O2_OAUTH2_GRANT_TYPE_PASSWORD[] = "password"; 0045 const char O2_OAUTH2_GRANT_TYPE_DEVICE[] = "urn:ietf:params:oauth:grant-type:device_code"; 0046 const char O2_OAUTH2_GRANT_TYPE[] = "grant_type"; 0047 const char O2_OAUTH2_API_KEY[] = "api_key"; 0048 const char O2_OAUTH2_STATE[] = "state"; 0049 const char O2_OAUTH2_CODE[] = "code"; 0050 0051 // OAuth 2 Response Parameters 0052 const char O2_OAUTH2_ACCESS_TOKEN[] = "access_token"; 0053 const char O2_OAUTH2_REFRESH_TOKEN[] = "refresh_token"; 0054 const char O2_OAUTH2_EXPIRES_IN[] = "expires_in"; 0055 const char O2_OAUTH2_DEVICE_CODE[] = "device_code"; 0056 const char O2_OAUTH2_USER_CODE[] = "user_code"; 0057 const char O2_OAUTH2_VERIFICATION_URI[] = "verification_uri"; 0058 const char O2_OAUTH2_VERIFICATION_URL[] = "verification_url"; // Google sign-in 0059 const char O2_OAUTH2_VERIFICATION_URI_COMPLETE[] = "verification_uri_complete"; 0060 const char O2_OAUTH2_INTERVAL[] = "interval"; 0061 0062 // OAuth signature types 0063 const char O2_SIGNATURE_TYPE_HMAC_SHA1[] = "HMAC-SHA1"; 0064 const char O2_SIGNATURE_TYPE_HMAC_SHA256[] = "HMAC-SHA256"; 0065 const char O2_SIGNATURE_TYPE_PLAINTEXT[] = "PLAINTEXT"; 0066 0067 // Parameter values 0068 const char O2_AUTHORIZATION_CODE[] = "authorization_code"; 0069 0070 // Standard HTTP headers 0071 const char O2_HTTP_HTTP_HEADER[] = "HTTP"; 0072 const char O2_HTTP_AUTHORIZATION_HEADER[] = "Authorization"; 0073 0074 #endif // O0GLOBALS_H