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

org.johnnei.enjin.spec.IUser Maven / Gradle / Ivy

The newest version!
package org.johnnei.enjin.spec;

import java.util.Optional;

import org.johnnei.enjin.spec.dto.Credentials;
import org.johnnei.enjin.spec.dto.User;

public interface IUser {

	/**
	 * Attempts to authenticate with the enjin site.
	 *
	 * @param credentials
	 *        The credentials to login with
	 * @return
	 *        The user object returned by the server.
	 */
	@EnjinMethod(method = "User.login", isAuthRequired = false)
	Optional login(Credentials credentials);

	/**
	 * Verifies if the session is still valid on the server.
	 *
	 * @param sessionId
	 *        The session ID of the user which has logged in
	 * @return
	 *        The user which is associated with the session id.
	 */
	@EnjinMethod(method = "User.checkSession", isAuthRequired = false)
	Optional checkSession(String sessionId);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy