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

com.authy.AuthyApiClient Maven / Gradle / Ivy

Go to download

This module is intended to include all Java code related to CAS MFA and Authy integration. Mostly for now, this only hosts Authy code.

There is a newer version: 1.0.0-RC10
Show newest version
package com.authy;

import com.authy.api.*;

/**
 * 
 * @author Julian Camargo
 *
 */
public class AuthyApiClient {
	private Users users;
	private Tokens tokens;
	private String apiUri, apiKey;
	
	public static final String DEFAULT_API_URI = "https://api.authy.com";
	
	public AuthyApiClient(String apiKey, String apiUri) {
		this.apiUri = apiUri;
		this.apiKey = apiKey;
		
		this.users = new Users(this.apiUri, this.apiKey);
		this.tokens = new Tokens(this.apiUri, this.apiKey);
	}
	
	public AuthyApiClient(String apiKey) {
		this.apiUri = DEFAULT_API_URI;
		this.apiKey = apiKey;
		
		this.users = new Users(this.apiUri, this.apiKey);
		this.tokens = new Tokens(this.apiUri, this.apiKey);
	}
	
	public AuthyApiClient(String apiKey, String apiUri, boolean testFlag) {
		this.apiUri = apiUri;
		this.apiKey = apiKey;
		
		this.users = new Users(this.apiUri, this.apiKey, testFlag);
		this.tokens = new Tokens(this.apiUri, this.apiKey, testFlag);
	}
	
	public Users getUsers() {
		return this.users;
	}
	
	public Tokens getTokens() {
		return this.tokens;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy