1 /* ownCloud Android client application
2 * Copyright (C) 2012-2013 ownCloud Inc.
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 package com
.owncloud
.android
.authentication
;
22 * Constant values for OAuth 2 protocol.
24 * Includes required and optional parameter NAMES used in the 'authorization code' grant type.
26 * @author David A. Velasco
29 public class OAuth2Constants
{
31 /// Parameters to send to the Authorization Endpoint
32 public static final String KEY_RESPONSE_TYPE
= "response_type";
33 public static final String KEY_REDIRECT_URI
= "redirect_uri";
34 public static final String KEY_CLIENT_ID
= "client_id";
35 public static final String KEY_SCOPE
= "scope";
36 public static final String KEY_STATE
= "state";
38 /// Additional parameters to send to the Token Endpoint
39 public static final String KEY_GRANT_TYPE
= "grant_type";
40 public static final String KEY_CODE
= "code";
42 /// Parameters received in an OK response from the Token Endpoint
43 public static final String KEY_ACCESS_TOKEN
= "access_token";
44 public static final String KEY_TOKEN_TYPE
= "token_type";
45 public static final String KEY_EXPIRES_IN
= "expires_in";
46 public static final String KEY_REFRESH_TOKEN
= "refresh_token";
48 /// Parameters in an ERROR response
49 public static final String KEY_ERROR
= "error";
50 public static final String KEY_ERROR_DESCRIPTION
= "error_description";
51 public static final String KEY_ERROR_URI
= "error_uri";
52 public static final String VALUE_ERROR_ACCESS_DENIED
= "access_denied";