Skip to content

How to use authenticateSession? #240

@odiwml147

Description

@odiwml147

I want to implement ocpp-1.6-j http auth, server code like this:

@Override
public void authenticateSession(SessionInformation information, String username, byte[] password) throws AuthenticationException {
     System.out.println("identifier: " + information.getIdentifier());
     System.out.println("username: " + username);
     System.out.println("password: " + password);
 }

client code like this:

        JSONConfiguration jsonConfiguration = JSONConfiguration.get();
        jsonConfiguration.setParameter(JSONConfiguration.USERNAME_PARAMETER, "Test025");
        jsonConfiguration.setParameter(JSONConfiguration.PASSWORD_PARAMETER, "123456");
        JSONClient jsonClient = new JSONClient(coreProfile, null, jsonConfiguration);

But The connection will be automatically closed without any exceptions,and the server cannot obtain the username and the password.
So, I would like to inquire about how to use it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions