File indexing completed on 2024-12-22 04:57:52

0001 /*
0002     SPDX-License-Identifier: BSD-2-Clause
0003 */
0004 
0005 #pragma once
0006 
0007 // Common constants
0008 const char O2_ENCRYPTION_KEY[] = "12345678";
0009 const char O2_CALLBACK_URL[] = "http://127.0.0.1:%1/";
0010 const char O2_MIME_TYPE_XFORM[] = "application/x-www-form-urlencoded";
0011 
0012 // QSettings key names
0013 const char O2_KEY_TOKEN[] = "token.%1";
0014 const char O2_KEY_TOKEN_SECRET[] = "tokensecret.%1";
0015 const char O2_KEY_CODE[] = "code.%1";
0016 const char O2_KEY_EXPIRES[] = "expires.%1";
0017 const char O2_KEY_REFRESH_TOKEN[] = "refreshtoken.%1";
0018 const char O2_KEY_LINKED[] = "linked.%1";
0019 const char O2_KEY_EXTRA_TOKENS[] = "extratokens.%1";
0020 
0021 // OAuth 1/1.1 Request Parameters
0022 const char O2_OAUTH_CALLBACK[] = "oauth_callback";
0023 const char O2_OAUTH_CONSUMER_KEY[] = "oauth_consumer_key";
0024 const char O2_OAUTH_NONCE[] = "oauth_nonce";
0025 const char O2_OAUTH_SIGNATURE[] = "oauth_signature";
0026 const char O2_OAUTH_SIGNATURE_METHOD[] = "oauth_signature_method";
0027 const char O2_OAUTH_TIMESTAMP[] = "oauth_timestamp";
0028 const char O2_OAUTH_VERSION[] = "oauth_version";
0029 // OAuth 1/1.1 Response Parameters
0030 const char O2_OAUTH_TOKEN[] = "oauth_token";
0031 const char O2_OAUTH_TOKEN_SECRET[] = "oauth_token_secret";
0032 const char O2_OAUTH_CALLBACK_CONFIRMED[] = "oauth_callback_confirmed";
0033 const char O2_OAUTH_VERFIER[] = "oauth_verifier";
0034 
0035 // OAuth 2 Request Parameters
0036 const char O2_OAUTH2_RESPONSE_TYPE[] = "response_type";
0037 const char O2_OAUTH2_CLIENT_ID[] = "client_id";
0038 const char O2_OAUTH2_CLIENT_SECRET[] = "client_secret";
0039 const char O2_OAUTH2_USERNAME[] = "username";
0040 const char O2_OAUTH2_PASSWORD[] = "password";
0041 const char O2_OAUTH2_REDIRECT_URI[] = "redirect_uri";
0042 const char O2_OAUTH2_SCOPE[] = "scope";
0043 const char O2_OAUTH2_GRANT_TYPE_CODE[] = "code";
0044 const char O2_OAUTH2_GRANT_TYPE_TOKEN[] = "token";
0045 const char O2_OAUTH2_GRANT_TYPE_PASSWORD[] = "password";
0046 const char O2_OAUTH2_GRANT_TYPE[] = "grant_type";
0047 const char O2_OAUTH2_API_KEY[] = "api_key";
0048 
0049 // OAuth 2 Response Parameters
0050 const char O2_OAUTH2_ACCESS_TOKEN[] = "access_token";
0051 const char O2_OAUTH2_REFRESH_TOKEN[] = "refresh_token";
0052 const char O2_OAUTH2_EXPIRES_IN[] = "expires_in";
0053 
0054 // OAuth signature types
0055 const char O2_SIGNATURE_TYPE_HMAC_SHA1[] = "HMAC-SHA1";
0056 const char O2_SIGNATURE_TYPE_PLAINTEXT[] = "PLAINTEXT";
0057 
0058 // Parameter values
0059 const char O2_AUTHORIZATION_CODE[] = "authorization_code";
0060 
0061 // Standard HTTP headers
0062 const char O2_HTTP_AUTHORIZATION_HEADER[] = "Authorization";