diff --git a/README.txt b/README.txt index a8b07bd..e583a26 100644 --- a/README.txt +++ b/README.txt @@ -30,7 +30,7 @@ Installation * If you want to use SOAP services you have to activate the Web service client SOAP module. * To use OAuth (v1) authentication the OAuth module must be installed: - https://www.drupal.org/project/oauth. + https://www.drupal.org/project/oauth Web service decriptions diff --git a/wsclient_ui/wsclient_ui.inc b/wsclient_ui/wsclient_ui.inc index d453685..fa105f5 100644 --- a/wsclient_ui/wsclient_ui.inc +++ b/wsclient_ui/wsclient_ui.inc @@ -358,9 +358,9 @@ function wsclient_service_form($form, &$form_state, $service, $op = 'edit') { '#type' => 'select', '#title' => t('Auth flow'), '#options' => array( - 'client-credentials' => 'client-credentials', - 'server-side' => 'server_side', - 'user-password' => 'user_password', + 'client-credentials' => t('Client credentials'), + 'server-side' => t('Server side'), + 'user-password' => t('User password'), ), '#default_value' => isset($oauth_settings['auth_flow']) ? $oauth_settings['auth_flow'] : '', ); @@ -375,13 +375,13 @@ function wsclient_service_form($form, &$form_state, $service, $op = 'edit') { '#type' => 'textfield', '#title' => t('Client key'), '#default_value' => isset($oauth_settings['client_key']) ? $oauth_settings['client_id'] : '', - '#description' => t('The client ID as registered on the oauth server.'), + '#description' => t('The client ID as registered on the OAuth server.'), ); $form['settings']['authentication']['oauth']['client_secret'] = array( '#type' => 'textfield', '#title' => t('Client secret'), '#default_value' => isset($oauth_settings['client_secret']) ? $oauth_settings['client_secret'] : '', - '#description' => t('The client secret as registered on the oauth server.'), + '#description' => t('The client secret as registered on the OAuth server.'), ); $form['settings']['authentication']['oauth']['scope'] = array( '#type' => 'textfield', @@ -400,25 +400,25 @@ function wsclient_service_form($form, &$form_state, $service, $op = 'edit') { '#type' => 'textfield', '#title' => t('Redirect URI'), '#default_value' => isset($oauth_settings['redirect_uri']) ? $oauth_settings['redirect_uri'] : '', - '#description' => t('E.g. https://client.org/oauth/authorized. Only needed for server-side auth_flow.'), + '#description' => t('E.g. https://client.org/oauth/authorized. Only needed for server-side auth flow.'), ) + $oauth_states_server_side; $form['settings']['authentication']['oauth']['authorization_endpoint'] = array( '#type' => 'textfield', '#title' => t('Authorization endpoint'), '#default_value' => isset($oauth_settings['authorization_endpoint']) ? $oauth_settings['authorization_endpoint'] : '', - '#description' => t('E.g. https://server.org/oauth/authorize. Only needed for server-side auth_flow.'), + '#description' => t('E.g. https://server.org/oauth/authorize. Only needed for server-side auth flow.'), ) + $oauth_states_server_side; $form['settings']['authentication']['oauth']['username'] = array( '#type' => 'textfield', '#title' => t('Username'), '#default_value' => isset($oauth_settings['username']) ? $oauth_settings['username'] : '', - '#description' => t('Username of resource owner on the oauth server. Only needed for user-password auth_flow.'), + '#description' => t('Username of resource owner on the OAuth server. Only needed for user-password auth flow.'), ) + $oauth_states_user_password; $form['settings']['authentication']['oauth']['password'] = array( '#type' => 'textfield', '#title' => t('Password'), '#default_value' => isset($oauth_settings['password']) ? $oauth_settings['password'] : '', - '#description' => t('Password of resource owner on the oauth server. Only needed for user-password auth_flow.'), + '#description' => t('Password of resource owner on the OAuth server. Only needed for user-password auth flow.'), ) + $oauth_states_user_password; } @@ -452,7 +452,7 @@ function wsclient_service_form($form, &$form_state, $service, $op = 'edit') { $form['settings']['authentication']['oauth2'] = array( '#type' => 'fieldset', - '#title' => t('OAuth2'), + '#title' => t('OAuth 2.0'), ) + $oauth2_states; $oauth_settings = isset($settings['authentication']['oauth2']) ? $settings['authentication']['oauth2'] : array(); @@ -461,9 +461,9 @@ function wsclient_service_form($form, &$form_state, $service, $op = 'edit') { '#type' => 'select', '#title' => t('Auth flow'), '#options' => array( - 'client-credentials' => 'client-credentials', - 'server-side' => 'server_side', - 'user-password' => 'user_password', + 'client-credentials' => t('Client credentials'), + 'server-side' => t('Server side'), + 'user-password' => t('User password'), ), '#default_value' => isset($oauth_settings['auth_flow']) ? $oauth_settings['auth_flow'] : '', ); @@ -479,13 +479,13 @@ function wsclient_service_form($form, &$form_state, $service, $op = 'edit') { '#type' => 'textfield', '#title' => t('Client ID'), '#default_value' => isset($oauth_settings['client_id']) ? $oauth_settings['client_id'] : '', - '#description' => t('The client ID as registered on the oauth2 server.'), + '#description' => t('The client ID as registered on the OAuth 2.0 server.'), ); $form['settings']['authentication']['oauth2']['client_secret'] = array( '#type' => 'textfield', '#title' => t('Client secret'), '#default_value' => isset($oauth_settings['client_secret']) ? $oauth_settings['client_secret'] : '', - '#description' => t('The client secret as registered on the oauth2 server.'), + '#description' => t('The client secret as registered on the OAuth 2.0 server.'), ); $form['settings']['authentication']['oauth2']['scope'] = array( '#type' => 'textfield', @@ -504,25 +504,25 @@ function wsclient_service_form($form, &$form_state, $service, $op = 'edit') { '#type' => 'textfield', '#title' => t('Redirect URI'), '#default_value' => isset($oauth_settings['redirect_uri']) ? $oauth_settings['redirect_uri'] : '', - '#description' => t('E.g. https://client.org/oauth2/authorized. Only needed for server-side auth_flow.'), + '#description' => t('E.g. https://client.org/oauth2/authorized. Only needed for server-side auth flow.'), ) + $oauth2_states_server_side; $form['settings']['authentication']['oauth2']['authorization_endpoint'] = array( '#type' => 'textfield', '#title' => t('Authorization endpoint'), '#default_value' => isset($oauth_settings['authorization_endpoint']) ? $oauth_settings['authorization_endpoint'] : '', - '#description' => t('E.g. https://server.org/oauth2/authorize. Only needed for server-side auth_flow.'), + '#description' => t('E.g. https://server.org/oauth2/authorize. Only needed for server-side auth flow.'), ) + $oauth2_states_server_side; $form['settings']['authentication']['oauth2']['username'] = array( '#type' => 'textfield', '#title' => t('Username'), '#default_value' => isset($oauth_settings['username']) ? $oauth_settings['username'] : '', - '#description' => t('Username of resource owner on the oauth2 server. Only needed for user-password auth_flow.'), + '#description' => t('Username of resource owner on the OAuth 2.0 server. Only needed for user-password auth flow.'), ) + $oauth2_states_user_password; $form['settings']['authentication']['oauth2']['password'] = array( '#type' => 'textfield', '#title' => t('Password'), '#default_value' => isset($oauth_settings['password']) ? $oauth_settings['password'] : '', - '#description' => t('Password of resource owner on the oauth2 server. Only needed for user-password auth_flow.'), + '#description' => t('Password of resource owner on the OAuth 2.0 server. Only needed for user-password auth flow.'), ) + $oauth2_states_user_password; // Input for global service parameters.