mirror of
https://github.com/LamGC/Oracle-Sentry.git
synced 2026-04-01 02:41:05 +00:00
fix: 通过 Constants 类获取首次认证策略类型.
通过 Constants 类获取首次认证策略类型, 以修复类型无法获取的问题.
This commit is contained in:
28
src/main/java/net/lamgc/oracle/sentry/Constants.java
Normal file
28
src/main/java/net/lamgc/oracle/sentry/Constants.java
Normal file
@ -0,0 +1,28 @@
|
||||
package net.lamgc.oracle.sentry;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author LamGC
|
||||
*/
|
||||
@Component("sentry.constants")
|
||||
public final class Constants {
|
||||
|
||||
public static Constants instance;
|
||||
|
||||
private Constants() {
|
||||
instance = this;
|
||||
}
|
||||
|
||||
@Value("${oracle.ssh.firstConnection.authenticationPolicy}")
|
||||
@NonNull
|
||||
private String firstConnectionPolicy;
|
||||
|
||||
|
||||
@NonNull
|
||||
public String getFirstConnectionPolicy() {
|
||||
return firstConnectionPolicy;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user