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

br.com.moip.authentication.OAuth Maven / Gradle / Ivy

There is a newer version: 4.7.6
Show newest version
package br.com.moip.authentication;

import java.net.HttpURLConnection;

public class OAuth implements Authentication {
	private String accessToken;

	public OAuth(String accessToken) {
		this.accessToken = accessToken;
	}

	public String getAccessToken() {
		return accessToken;
	}

	public void authenticate(HttpURLConnection connection) {
		connection.addRequestProperty("Authorization", "OAuth " + accessToken);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy