From 9e51df1e01e47b4b9678c69a9d3adae7555de1c9 Mon Sep 17 00:00:00 2001 From: jvelilla Date: Thu, 18 Jun 2015 12:35:56 -0300 Subject: [PATCH] Updated OAUTH consumer using STRING_8 instead of STRING_32 --- .../persistence/cms_oauth_20_generic_api.e | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/login/persistence/cms_oauth_20_generic_api.e b/modules/login/persistence/cms_oauth_20_generic_api.e index 9de5716..552d2ea 100644 --- a/modules/login/persistence/cms_oauth_20_generic_api.e +++ b/modules/login/persistence/cms_oauth_20_generic_api.e @@ -19,7 +19,7 @@ create feature {NONE} -- Initialize - make (a_endpoint: READABLE_STRING_32; a_authorize_url: READABLE_STRING_32; a_extractor: READABLE_STRING_32) + make (a_endpoint: READABLE_STRING_8; a_authorize_url: READABLE_STRING_8; a_extractor: READABLE_STRING_8) do endpoint := a_endpoint authorize_url := a_authorize_url @@ -30,13 +30,13 @@ feature {NONE} -- Initialize extractor_set: extractor = a_authorize_url end - endpoint: READABLE_STRING_32 + endpoint: READABLE_STRING_8 -- Url that receives the access token request. - authorize_url: READABLE_STRING_32 + authorize_url: READABLE_STRING_8 -- - extractor: READABLE_STRING_32 + extractor: READABLE_STRING_8 -- text, json feature -- Access @@ -51,37 +51,37 @@ feature -- Access end end - access_token_verb: STRING_32 + access_token_verb: STRING_8 do Result := "POST" end - access_token_endpoint: STRING_32 + access_token_endpoint: STRING_8 -- Url that receives the access token request do - create {STRING_32} Result.make_from_string (endpoint) + create Result.make_from_string (endpoint) end - authorization_url (config: OAUTH_CONFIG): detachable STRING_32 + authorization_url (config: OAUTH_CONFIG): detachable STRING_8 -- Url where you should redirect your users to authneticate local - l_result: STRING_32 + l_result: STRING_8 do if attached config.scope as l_scope then - create {STRING_32} l_result.make_from_string (authorize_url + SCOPED_AUTHORIZE_URL) + create l_result.make_from_string (authorize_url + SCOPED_AUTHORIZE_URL) l_result.replace_substring_all ("$CLIENT_ID", config.api_key.as_string_8) if attached config.callback as l_callback then - l_result.replace_substring_all ("$REDIRECT_URI", (create {OAUTH_ENCODER}).encoded_string (l_callback.as_string_32)) + l_result.replace_substring_all ("$REDIRECT_URI", (create {OAUTH_ENCODER}).encoded_string (l_callback.as_string_8)) end if attached config.callback as l_callback then - l_result.replace_substring_all ("$SCOPE", (create {OAUTH_ENCODER}).encoded_string (l_scope.as_string_32)) + l_result.replace_substring_all ("$SCOPE", (create {OAUTH_ENCODER}).encoded_string (l_scope.as_STRING_8)) Result := l_result end else - create {STRING_32} l_result.make_from_string (authorize_url + SCOPED_AUTHORIZE_URL) + create l_result.make_from_string (authorize_url + SCOPED_AUTHORIZE_URL) l_result.replace_substring_all ("$CLIENT_ID", config.api_key.as_string_8) if attached config.callback as l_callback then - l_result.replace_substring_all ("$REDIRECT_URI", (create {OAUTH_ENCODER}).encoded_string (l_callback.as_string_32)) + l_result.replace_substring_all ("$REDIRECT_URI", (create {OAUTH_ENCODER}).encoded_string (l_callback.as_string_8)) end end end