From 0597a5d9aa074a7d7156998612221d961cf83d13 Mon Sep 17 00:00:00 2001 From: Stefan Puraner Date: Tue, 12 Apr 2016 15:16:33 +0200 Subject: [PATCH 1/2] excluded api methods from auth --- application/config/rest.php | 11 ++++++++++- .../controllers/api/v1/{person => }/Kontakt.php | 0 application/libraries/{FHC_Auth.php => Fhcauth.php} | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) rename application/controllers/api/v1/{person => }/Kontakt.php (100%) rename application/libraries/{FHC_Auth.php => Fhcauth.php} (98%) diff --git a/application/config/rest.php b/application/config/rest.php index 078d6c097..8b891c347 100644 --- a/application/config/rest.php +++ b/application/config/rest.php @@ -145,7 +145,7 @@ $config['auth_source'] = 'library'; | e.g: md5('admin:REST API:1234') = '1e957ebc35631ab22d5bd6526bd14ea2' | */ -$config['auth_library_class'] = 'FHCAuth'; +$config['auth_library_class'] = 'Fhcauth'; $config['auth_library_function'] = 'auth'; /* @@ -189,6 +189,15 @@ $config['auth_library_function'] = 'auth'; | $config['auth_override_class_method_http']['deals']['*']['options'] = 'none'; */ +$config['auth_override_class_method_http']['Person']['checkBewerbung']['get'] = 'none'; +$config['auth_override_class_method_http']['Person']['person']['post'] = 'none'; +$config['auth_override_class_method_http']['Person']['person']['get'] = 'none'; +$config['auth_override_class_method_http']['Kontakt']['kontakt']['post'] = 'none'; +$config['auth_override_class_method_http']['Person']['checkZugangscodePerson']['get'] = 'none'; +$config['auth_override_class_method_http']['Kontakt']['kontaktPerson']['get'] = 'none'; +$config['auth_override_class_method_http']['Person']['personFromCode']['post'] = 'none'; +$config['auth_override_class_method_http']['Person']['personUpdate']['post'] = 'none'; + // ---Uncomment list line for the wildard unit test // $config['auth_override_class_method_http']['wildcard_test_cases']['*']['options'] = 'basic'; diff --git a/application/controllers/api/v1/person/Kontakt.php b/application/controllers/api/v1/Kontakt.php similarity index 100% rename from application/controllers/api/v1/person/Kontakt.php rename to application/controllers/api/v1/Kontakt.php diff --git a/application/libraries/FHC_Auth.php b/application/libraries/Fhcauth.php similarity index 98% rename from application/libraries/FHC_Auth.php rename to application/libraries/Fhcauth.php index 4e715efe3..3fda76f57 100644 --- a/application/libraries/FHC_Auth.php +++ b/application/libraries/Fhcauth.php @@ -25,7 +25,7 @@ require_once FCPATH.'include/authentication.class.php'; // ------------------------------------------------------------------------ -class FHC_Auth +class Fhcauth { /** * Auth Username, Password over FH-Complete From 094a045310c490c2cbee1e4f48367c37479aba4d Mon Sep 17 00:00:00 2001 From: Stefan Puraner Date: Wed, 13 Apr 2016 13:45:34 +0200 Subject: [PATCH 2/2] fixed auth bug --- application/config/rest.php | 4 ++-- application/libraries/{Fhcauth.php => FHC_Auth.php} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename application/libraries/{Fhcauth.php => FHC_Auth.php} (98%) diff --git a/application/config/rest.php b/application/config/rest.php index ebe4e7cf5..3e311e078 100644 --- a/application/config/rest.php +++ b/application/config/rest.php @@ -194,11 +194,11 @@ $config['auth_library_function'] = 'auth'; $config['auth_override_class_method_http']['Person']['checkBewerbung']['get'] = 'none'; $config['auth_override_class_method_http']['Person']['person']['post'] = 'none'; $config['auth_override_class_method_http']['Person']['person']['get'] = 'none'; -$config['auth_override_class_method_http']['Kontakt']['kontakt']['post'] = 'none'; $config['auth_override_class_method_http']['Person']['checkZugangscodePerson']['get'] = 'none'; -$config['auth_override_class_method_http']['Kontakt']['kontaktPerson']['get'] = 'none'; $config['auth_override_class_method_http']['Person']['personFromCode']['post'] = 'none'; $config['auth_override_class_method_http']['Person']['personUpdate']['post'] = 'none'; +$config['auth_override_class_method_http']['Kontakt']['kontakt']['post'] = 'none'; +$config['auth_override_class_method_http']['Kontakt']['kontaktPerson']['get'] = 'none'; // ---Uncomment list line for the wildard unit test // $config['auth_override_class_method_http']['wildcard_test_cases']['*']['options'] = 'basic'; diff --git a/application/libraries/Fhcauth.php b/application/libraries/FHC_Auth.php similarity index 98% rename from application/libraries/Fhcauth.php rename to application/libraries/FHC_Auth.php index 3fda76f57..4e715efe3 100644 --- a/application/libraries/Fhcauth.php +++ b/application/libraries/FHC_Auth.php @@ -25,7 +25,7 @@ require_once FCPATH.'include/authentication.class.php'; // ------------------------------------------------------------------------ -class Fhcauth +class FHC_Auth { /** * Auth Username, Password over FH-Complete