- 
AutorBeiträge
- 
- 
26. Februar 2025 um 14:53 Uhr - Views: 169 #34352Hi there, My name is Luis, I’m trying to create and integrate a custom module to authenticate customers thru an external API, but after several attempts I changed some settings and now I have an error when I tried to rebuild the config:  I removed all the config files (previously)   From the Admin Console I have incorrect settings but I don’t know how to remove them 
   These are my config files AuthAPI1.xml 
 <?xml version=“1.0″ encoding=“utf-8″?>
 <otobo_config version=“2.0″ init=“Changes“>
 <Setting Name=“Customer::AuthModule“ Required=“1″ Valid=“1″ ConfigLevel=“200″>
 <Description Translatable=“1″>Defines the module to authenticate customers.</Description>
 <Navigation>Core::Auth::Customer</Navigation>
 <Value>
 <Item ValueType=“PerlModule“ ValueFilter=“Kernel/System/CustomerAuth/*.pm“>Kernel::System::CustomerAuth::AuthAPI1</Item>
 </Value>
 </Setting>
 </otobo_config>AuthAPI1.pm: package Kernel::System::CustomerAuth::AuthAPI1; use strict; 
 use warnings;
 use LWP::UserAgent;
 use JSON;sub new { 
 my ( $Type, %Param ) = @_;
 my $Self = {};
 bless( $Self, $Type );
 return $Self;
 }sub GetOption { 
 my ( $Self, %Param ) = @_;# check needed stuff 
 if ( !$Param{What} ) {
 $Self->{LogObject}->Log( Priority => ‚error‘, Message => „Need What!“ );
 return;
 }# module options 
 my %Option = ( PreAuth => 0, );# return option 
 return $Option{ $Param{What} };
 }sub Auth { 
 my ( $Self, %Param ) = @_;my $Username = $Param{User}; 
 my $Password = $Param{Pw};return if !$Username || !$Password; my $api_url = „https://MyLoginAPIfromMyDomain“; 
 my $ua = LWP::UserAgent->new;
 my $response = $ua->post(
 $api_url,
 Content_Type => ‚application/json‘,
 Content => encode_json( { cui => $Username, password => $Password } ),
 );if ( $response->is_success ) { 
 my $decoded_response = decode_json( $response->decoded_content );
 return $Username if $decoded_response->{authenticated};
 }return; 
 }1; I found this command, but I am not sure how to use it: 
 bin/otobo.Console.pl Admin::Config::Update –setting-name SMIME::CertPath –value ‚/opt/otobo/var/certs‘ –no-deploy¿How can effectively remove those incorrect settings in order to rebuild again the configuration? Otobo version 10.1 Thanks for your help, Regards 
 
- 
- 
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.





