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

com.aeontronix.enhancedmule.tools.authentication.AnypointBearerTokenCredentials 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 AnypointBearerTokenCredentials implements Credentials {
    private String bearerToken;

    public AnypointBearerTokenCredentials() {
    }

    public AnypointBearerTokenCredentials(String bearerToken) {
        this.bearerToken = bearerToken;
    }

    public String getBearerToken() {
        return bearerToken;
    }

    public void setBearerToken(String bearerToken) {
        this.bearerToken = bearerToken;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy