Imported Upstream version 1.1.0
[platform/upstream/iotivity.git] / cloud / account / src / main / java / org / iotivity / cloud / accountserver / Constants.java
1 /*
2  * //******************************************************************
3  * //
4  * // Copyright 2016 Samsung Electronics All Rights Reserved.
5  * //
6  * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7  * //
8  * // Licensed under the Apache License, Version 2.0 (the "License");
9  * // you may not use this file except in compliance with the License.
10  * // You may obtain a copy of the License at
11  * //
12  * //      http://www.apache.org/licenses/LICENSE-2.0
13  * //
14  * // Unless required by applicable law or agreed to in writing, software
15  * // distributed under the License is distributed on an "AS IS" BASIS,
16  * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * // See the License for the specific language governing permissions and
18  * // limitations under the License.
19  * //
20  * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21  */
22 package org.iotivity.cloud.accountserver;
23
24 public class Constants {
25
26     // MongoDB
27     public static final String DEVICE_TABLE          = "USER_DEVICE";
28     public static final String SESSION_TABLE         = "USER_SESSION";
29     public static final String DB_NAME               = "ACCOUNTSERVER_DB";
30     public static final String USER_ID               = "userId";
31     public static final String DEVICE_ID             = "deviceId";
32     public static final String SESSION_CODE          = "sessionCode";
33
34     // Resource Uri
35     public static final String AUTH_URI              = "oic/auth";
36     public static final String ACCOUNT_URI           = "oic/account";
37
38     // query parameter
39     public static final String REQ_TYPE              = "reqtype";
40
41     // request type
42     public static final String TYPE_REGISTER         = "register";
43     public static final String TYPE_LOGIN            = "login";
44     public static final String TYPE_PUBLISH          = "publish";
45     public static final String TYPE_FIND             = "find";
46
47     // request payload
48     public static final String REQUEST_AUTH_CODE     = "authcode";
49     public static final String REQUEST_AUTH_SERVER   = "authprovider";
50     public static final String REQUEST_DEVICE_ID     = "deviceid";
51     public static final String REQUEST_USER_ID       = "userid";
52     public static final String REQUEST_SESSION_CODE  = "session";
53
54     // response
55     public static final String RESPONSE_SESSION_CODE = "session";
56     public static final String RESPONSE_USER_ID      = "userid";
57     public static final String RESPONSE_STATE        = "state";
58     public static final String RESPONSE_DEVICES      = "devices";
59
60     // auth servers
61     public static final String GITHUB                = "github";
62     public static final String GOOGLE                = "google";
63     public static final String FACEBOOK              = "facebook";
64 }