|
|
|
|
class Authorization |
{ |
inherit Auth.OAuth2.Client; |
|
|
constant OAUTH_AUTH_URI = "https://accounts.google.com/o/oauth2/auth"; |
|
|
constant OAUTH_TOKEN_URI = "https://accounts.google.com/o/oauth2/token"; |
|
|
constant SCOPE_PROFILE = "profile"; |
|
|
constant SCOPE_EMAIL = "email"; |
|
|
constant SCOPE_OPENID = "openid"; |
|
|
protected multiset(string) valid_scopes = (< |
SCOPE_PROFILE, SCOPE_EMAIL, SCOPE_OPENID >); |
|
protected string _scope = SCOPE_PROFILE; |
} |
|
|
class Analytics |
{ |
inherit Authorization; |
|
|
constant SCOPE_RO = "https://www.googleapis.com/auth/analytics.readonly"; |
constant SCOPE_RW = "https://www.googleapis.com/auth/analytics"; |
constant SCOPE_EDIT = "https://www.googleapis.com/auth/analytics.edit"; |
constant SCOPE_MANAGE_USERS = |
"https://www.googleapis.com/auth/analytics.manage.users"; |
constant SCOPE_MANAGE_USERS_RO = |
"https://www.googleapis.com/auth/analytics.manage.users.readonly"; |
|
|
protected multiset(string) valid_scopes = (< |
SCOPE_RO, SCOPE_RW, SCOPE_EDIT, SCOPE_MANAGE_USERS, |
SCOPE_MANAGE_USERS_RO >); |
|
|
protected string _scope = SCOPE_RO; |
} |
|
|
class Plus |
{ |
inherit Authorization; |
|
|
constant SCOPE_ME = "https://www.googleapis.com/auth/plus.me"; |
constant SCOPE_LOGIN = "https://www.googleapis.com/auth/plus.login"; |
|
|
protected multiset(string) valid_scopes = (< |
SCOPE_ME, SCOPE_LOGIN, SCOPE_EMAIL >); |
|
|
protected string _scope = SCOPE_ME; |
} |
|
|