CA Gateway Token 대응 Bearer토큰 발급용

This commit is contained in:
Yunsam.Eo
2025-12-03 10:30:04 +09:00
parent 8d637d310a
commit e000fb03de
5 changed files with 414 additions and 0 deletions
@@ -0,0 +1,49 @@
package com.eactive.eai.authserver.custom;
import java.util.Set;
import com.fasterxml.jackson.annotation.JsonProperty;
public class BearerTokenInfo {
@JsonProperty("client_id")
private String clientId;
private Long expiresIn;
private Long expiresAt;
private Set<String> scopeSet;
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public Long getExpiresIn() {
return expiresIn;
}
public void setExpiresIn(Long expiresIn) {
this.expiresIn = expiresIn;
}
public Long getExpiresAt() {
return expiresAt;
}
public void setExpiresAt(Long expiresIn) {
this.expiresAt = System.currentTimeMillis() + (expiresIn * 1000);
}
public Set<String> getScopeSet() {
return scopeSet;
}
public void setScopeSet(Set<String> scopeSet) {
this.scopeSet = scopeSet;
}
public boolean isExpired() {
return System.currentTimeMillis() > expiresAt;
}
}