[Ovmsdev] Simple Auth for api
Mark Webb-Johnson
mark at openvehicles.com
Fri Mar 14 07:48:28 HKT 2025
Chris,
If you’d like to provide a simple contribution to the project it would be:
AuthSimple.pm
Use the Config::IniFiles config file we already have, with a new section to store the userid, password, etc.
For users wanting to run their own server, but only having one user, that would be useful.
Regards, Mark.
> On 14 Mar 2025, at 12:38 AM, Chris van der Meijden via OvmsDev <ovmsdev at lists.openvehicles.com> wrote:
>
> OK, it was not that hard ...
>
> In the AuthNone.pm I changed the sub Authenticate to
>
> sub Authenticate
> {
> my ($user,$password) = @_;
> if ($user eq "xxx" && $password eq "yyy") {
> return '*';
> } else {
> return '';
> }
> }
>
> and activated AuthNone in the ovms_sever.conf
>
>
>
> Am Donnerstag, dem 13.03.2025 um 11:34 +0100 schrieb Chris van der Meijden via OvmsDev:
>> I'm trying to connect our e-UP to EVCC using the http api.
>>
>> This fails, because I don't have a Drupal server installed. I only found AuhDrupal and AuthNone as modules for the the server.
>>
>> I don't want to install a Drupal instance for only one user, so I'm now trying to write a AuthSimple module for only one user with the username and password included in the code (I know, unsecure), so that the authentication for that user goes through and I get the variables I need for EVCC.
>>
>> Before I reinvent the wheel, does a code snippet perhaps exists, that does the trick?
>>
>> Regards
>>
>> Chris
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.openvehicles.com <mailto:OvmsDev at lists.openvehicles.com>
>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20250314/269503b4/attachment.htm>
More information about the OvmsDev
mailing list