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

com.eshore.uas.auth.DefaultShare Maven / Gradle / Ivy

package com.eshore.uas.auth;

import java.util.UUID;

public class DefaultShare implements IShare{

	/**
	 * 主密钥
	 */
	private String secret;
	
	/**
	 * 从密钥
	 */
	private String secondSecret;
	
	/**
	 * 更新时间
	 */
	long lastTokenTime=0l;
	
	static long duration=24*60*60*1000;
	
	/**
	 * 刷新密钥
	 */
	private void flushSecret() {
		if(System.currentTimeMillis()-lastTokenTime>duration||secret==null) {
			doFlush();
		}
	}
	
	synchronized void doFlush() {
		if(System.currentTimeMillis()-lastTokenTime




© 2015 - 2025 Weber Informatics LLC | Privacy Policy