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

de.sekmi.li2b2.services.token.TokenManager Maven / Gradle / Ivy

Go to download

This project emulates the core components of an i2b2 server backend. Basic functionality of PM, CRC, ONT and WORK cells allows the official i2b2 webclient to connect ot this emulated server.

The newest version!
package de.sekmi.li2b2.services.token;

import java.security.Principal;

/**
 * Simple token management interface
 * used for the li2b2 server.
 *
 * @author R.W.Majeed
 *
 */
public interface TokenManager {

	/**
	 * Register a principal (user) and return a token
	 * @param name principal name
	 * @return token string
	 */
	String registerPrincipal(String name);

	Token lookupToken(String uuid);

	/**
	 * Renew the specified token. If it is not renewed,
	 * it will expire after the number of milliseconds
	 * specified by {@link #getExpirationMillis()}.
	 * 

* The token can also be renewed via {@link Token#renew()}. *

* @param uuid uuid of the token to renew */ void renew(String uuid); int getTokenCount(); /** * Get the number of milliseconds after which a token will expire * if it is not renewed before. *

* Override this method to change the expiration time *

* @return expiration timeout in milliseconds */ long getExpirationMillis(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy