diff --git a/css/rest_api_authentication.basic_style_settings.css b/css/rest_api_authentication.basic_style_settings.css index 54eee55416eadf655fb7461ed66df25b04370eaa..e0d1e5e693826e84cf7aa8cf51fad5e45cb0b11e 100644 --- a/css/rest_api_authentication.basic_style_settings.css +++ b/css/rest_api_authentication.basic_style_settings.css @@ -11,6 +11,9 @@ background-color: #f3f4f9 !important; padding: 0.5%; } +.td-class{ + padding: 0%; +} #module_background{ background-color: black; diff --git a/rest_api_authentication.info.yml b/rest_api_authentication.info.yml index 91025a59ece0840fb7bc5e6a66f3c95f12733e46..a55f840837b3f3734f018f2ae76c7c63103976d6 100644 --- a/rest_api_authentication.info.yml +++ b/rest_api_authentication.info.yml @@ -3,22 +3,3 @@ type: module core_version_requirement: ^9.3 || ^10 description: 'Drupal API Authentication module secures unauthorized access to your Drupal site APIs using different API authentication methods.' configure: rest_api_authentication.auth_settings -# Information added by Drupal.org packaging script on 2022-12-20 -# version: '2.0.1' -# project: 'rest_api_authentication' -# datestamp: 1671539472 - -# Information added by Drupal.org packaging script on 2023-01-07 -# version: '2.0.3' -# project: 'rest_api_authentication' -# datestamp: 1673072410 - -# Information added by Drupal.org packaging script on 2023-02-02 -# version: '2.0.5' -# project: 'rest_api_authentication' -# datestamp: 1675316471 - -# Information added by Drupal.org packaging script on 2023-02-02 -version: '2.0.6' -project: 'rest_api_authentication' -datestamp: 1675327461 diff --git a/rest_api_authentication.install b/rest_api_authentication.install index d44b0adfa219d12b6fb8764fe7611d9cc6f45405..983f40a2dd06dc0021715f6fc04c95518003c5ea 100644 --- a/rest_api_authentication.install +++ b/rest_api_authentication.install @@ -1,3 +1,4 @@ + <?php /** * @file diff --git a/src/Utilities.php b/src/Utilities.php index a3126165282a5a88d53388f9587821882e89eed2..d3b123e6c027490d95391a2d75d78ac477e80408 100644 --- a/src/Utilities.php +++ b/src/Utilities.php @@ -191,7 +191,7 @@ class Utilities { <br><br>Looking forward to hearing from you. <br><br>Thanks and Regards, <br>miniOrange Drupal team - <br><br><b>This is an auto generated email so please do not reply to this message.</b>'; + <br><br><b>This is an auto generated email so please do not reply to this message.</b> You can reply to us on <a href="mailto:drupalsupport@xecurify.com">drupalsupport@xecurify.com</a>'; $fields = array( 'customerKey' => $customerKey, diff --git a/src/advancedSettingsForm.php b/src/advancedSettingsForm.php index 7f0c81e26530eed9e106d1ea39383fc8ebf2b76c..9a56a5f0548e09bbce30dd70760902fa7ea7a281 100644 --- a/src/advancedSettingsForm.php +++ b/src/advancedSettingsForm.php @@ -40,7 +40,7 @@ class advancedSettingsForm{ $form['advancedsettings']['support_container_outline']['token_expiry'] = array( '#type' => 'details', '#title' => t(' Token Expiry Configurations'), - '#description' => 'Eligible for OAuth 2.0 and JWT Authentication. JWT Token and the OAuth Access Token will be get expired after the given time.', + '#description' => 'Applicable for OAuth 2.0 and JWT Authentication methods. JWT Token and the OAuth Access Token will be get expired after the given time.', ); $form['advancedsettings']['support_container_outline']['token_expiry']['access_token_expiry_time'] = array( diff --git a/src/setupAuthenticationForm.php b/src/setupAuthenticationForm.php index fe3e6e4c4b68985142726db29d4ccd96e3d6757b..447a8aa3087e808597711ad9b997532a9209960c 100644 --- a/src/setupAuthenticationForm.php +++ b/src/setupAuthenticationForm.php @@ -21,14 +21,15 @@ class setupAuthenticationForm{ '#group' => 'verticaltabs', ]; - $form['api_auth']['mo_rest_api_authentication_authenticator']['head_text'] = array( - '#markup' => '<div><b>SELECT AUTHENTICATION METHOD OF YOUR CHOICE: </b><a class=" shift-right" target="_blank" href="https://www.drupal.org/docs/contributed-modules/api-authentication"><b>How To Setup?</b></a></div><hr><br><div class="mo_rest_api_highlight_background_note_1">Need any help? We can help you with configuring your API authentication method. Just send us a query and we will get back to you soon.</div>', + $form['api_auth']['mo_rest_api_authentication_authenticator']['head_note'] = array( + '#markup' => '<div class="mo_rest_api_highlight_background_note_1">Need any help? We will be more than happy to help you with configuring the module as per your use case requirements.</div><br>', ); + $form['api_auth']['mo_rest_api_authentication_authenticator']['enable_authentication'] = array( '#type' => 'checkbox', '#title' => t('Enable Authentication'), '#default_value' => \Drupal::config('rest_api_authentication.settings')->get('enable_authentication'), - '#description' => 'Select this checkbox to enable API Authentication ', + '#description' => 'Select this checkbox to enable authenticating your Drupal APIs through this module', ); $form['api_auth']['mo_rest_api_authentication_authenticator']['whitelist_get_apis'] = array( @@ -46,9 +47,11 @@ class setupAuthenticationForm{ '#submit' => array('::rest_api_authentication_save_basic_config'), ); + $form['api_auth']['mo_rest_api_authentication_authenticator']['head_text'] = array( + '#markup' => '<table><tr><td class="td-class"><b>Select the authentication method of your choice: </td><td></b><a class="button button--small shift-right" target="_blank" href="https://www.drupal.org/docs/contributed-modules/api-authentication">How To Setup?</a></td></tr></table>', + ); $form['api_auth']['mo_rest_api_authentication_authenticator']['settings']['active'] = array( '#type' => 'radios', - '#prefix' => '<br>', '#title' => '', '#default_value' => \Drupal::config('rest_api_authentication.settings')->get('authentication_method'), '#options' => array( @@ -66,6 +69,7 @@ class setupAuthenticationForm{ '#button_type' => 'primary', '#states' => array('visible' => array(':input[name = "active"]' => array('value' => 0 ), ),), '#value' => t('Select Method'), + '#attributes' => array('style' => 'margin-top:0%'), '#submit' => array('::rest_api_authentication_save_basic_auth_conf'), ); @@ -169,7 +173,7 @@ class setupAuthenticationForm{ '#submit' => array('::rest_api_authentication_save_id_token'), ); $form['api_auth']['select_api_head_text'] = array( - '#markup' => '<br><br><b>APIs TO BE RESTRICTED: </b><a href = "'.$base_url.'/admin/config/people/rest_api_authentication/auth_settings?tab=edit-upgrade-plans"><b>[PREMIUM]</b></a><hr>', + '#markup' => '<br><br><b>APIs to be restricted: </b><a href = "'.$base_url.'/admin/config/people/rest_api_authentication/auth_settings?tab=edit-upgrade-plans"><b>[PREMIUM]</b></a><hr>', ); $form['api_auth']['head_api_options'] = array( '#type' => 'checkbox', @@ -187,6 +191,14 @@ class setupAuthenticationForm{ '#attributes' => array('class' => array('container-inline')), ); + $form['api_auth']['head_graphql_options'] = array( + '#type' => 'checkbox', + '#title' => '<b><a target="_blank" href="'.MiniorangeApiAuthConstants::DRUPAL_SITE.'/docs/contributed-modules/graphql">GraphQL APIs</a></b>', + '#default_value' => "0", + '#disabled' => true, + '#attributes' => array('class' => array('container-inline')), + ); + $form['api_auth']['head_customapi_options'] = array( '#type' => 'checkbox', '#title' => 'Any Other/Custom APIs',