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

com.github.zj.dreamly.security.jwt.SecurityProperties Maven / Gradle / Ivy

There is a newer version: 1.0.0-beta.6
Show newest version
package com.github.zj.dreamly.security.jwt;

import com.github.zj.dreamly.security.jwt.spec.Spec;
import io.jsonwebtoken.SignatureAlgorithm;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.List;

/**
 * 配置属性
 *
 * @author 苍海之南
 */
@ConfigurationProperties(prefix = "dreamly.security")
@Getter
@Setter
@SuppressWarnings("all")
public class SecurityProperties {
	private Jwt jwt = new Jwt();

	/**
	 * permission list
	 */
	private List specList = new ArrayList<>();

	@Getter
	@Setter
	public static class Jwt {
		/**
		 * secret
		 */
		private String secret = "I-Love-You-My-Lovely-Baby-I-Love-You-My-Lovely-Baby-I-Love-You-My-Lovely-Baby";

		/**
		 * Token validity time (seconds), default is 2 weeks
		 */
		private Long expirationInSecond = 1209600L;

		/**
		 * Signing algorithm, default sha512
		 */
		private SignatureAlgorithm algorithm = SignatureAlgorithm.HS512;
	}
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy