All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aeontronix.enhancedmule.tools.authentication.AnypointUsernamePasswordCredentials Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha4
Show newest version
/*
 * Copyright (c) Aeontronix 2020
 */

package com.aeontronix.enhancedmule.tools.authentication;

import java.util.HashMap;
import java.util.Map;

public class AnypointUsernamePasswordCredentials implements Credentials {
    private String username;
    private String password;

    public AnypointUsernamePasswordCredentials() {
    }

    public AnypointUsernamePasswordCredentials(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public Map toAuthRequestPayload() {
        final HashMap map = new HashMap<>();
        map.put("type","AN_UPW");
        map.put("id",username);
        map.put("secret",password);
        return map;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy