-
Notifications
You must be signed in to change notification settings - Fork 17
/
uOAuth2Consts.pas
48 lines (38 loc) · 1.02 KB
/
uOAuth2Consts.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
Simple OAuth2 client
(C) 2016, Stefan Ascher
}
unit uOAuth2Consts;
{$IFDEF FPC}
{$mode objfpc}
{$H+}
{$ENDIF}
interface
const
OAUTH2_TOKEN_ENDPOINT = '/token';
OATUH2_ACCESS_TOKEN = 'access_token';
OAUTH2_GRANT_TYPE = 'grant_type';
OAUTH2_REFRESH_TOKEN = 'refresh_token';
OAUTH2_EXPIRES_IN = 'expires_in';
OAUTH2_MACKEY = 'mac_key';
OAUTH2_MAXALGORITHM = 'mac_algorithm';
OAUTH2_CLIENT_ID = 'client_id';
OAUTH2_CLIENT_SECRET = 'client_secret';
OAUTH2_TOKEN_TYPE = 'token_type';
OAUTH2_USERNAME = 'username';
OAUTH2_PASSWORD = 'password';
OAUTH2_SCOPE = 'scope';
OAUTH2_REDIRECT_URI = 'redirect_uri';
OAUTH2_CODE = 'code';
OAUTH2_TOKENTYPE_BEARER = 'Bearer';
OAUTH2_TOKENTYPE_MAC = 'MAC';
OATUH2_BASIC = 'Basic';
OAUTH2_AUTHORIZATION = 'Authorization';
CONTENTTYPTE_JSON = 'application/json';
CONTENTTYPTE_XML = 'application/xml';
CONTENTTYPTE_URL_ENCODED = 'application/x-www-form-urlencoded';
HTTP_OK = 200;
HTTP_UNAUTHORIZED = 401;
HTTP_FORBIDDEN = 403;
implementation
end.