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

org.openlca.collaboration.model.Credentials Maven / Gradle / Ivy

package org.openlca.collaboration.model;

public interface Credentials {

	String username();

	String password();

	default String token() {
		return null;
	}

	default String promptToken() {
		return null;
	}

	default boolean onUnauthenticated() {
		return false;
	}

	default boolean onUnauthorized() {
		return false;
	}

	static Credentials of(String username, String password) {
		return new Credentials() {
			@Override
			public String username() {
				return username;
			}

			@Override
			public String password() {
				return password;
			}
		};
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy