add lombok to clean codebase
This commit is contained in:
@@ -25,5 +25,12 @@
|
||||
<version>${querydsl.version}</version>
|
||||
<classifier>jakarta</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- Lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -143,7 +143,7 @@ public class OidcSessionManager {
|
||||
* @return the all by target
|
||||
*/
|
||||
public List<OidcSession> getAllByTarget(Long clientId) {
|
||||
return Lists.newArrayList(oidcSessionRepository.findAll(qOidcSession.client.eq(clientId)));
|
||||
return Lists.newArrayList(oidcSessionRepository.findAll(qOidcSession.clientId.eq(clientId)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -165,7 +165,7 @@ public class OidcSessionManager {
|
||||
*/
|
||||
public List<OidcSession> getAllByTargetAndSubject(Long clientId, Long subject) {
|
||||
return Lists.newArrayList(
|
||||
oidcSessionRepository.findAll(qOidcSession.client.eq(clientId).and(qOidcSession.subject.eq(subject))));
|
||||
oidcSessionRepository.findAll(qOidcSession.clientId.eq(clientId).and(qOidcSession.subject.eq(subject))));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
-72
@@ -6,10 +6,14 @@ package de.bstly.we.oidc.businesslogic.exception;
|
||||
import java.net.URI;
|
||||
|
||||
import de.bstly.we.oidc.businesslogic.model.OidcAuthorizationErrorCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class InvalidAuthorizationRequestException.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class InvalidAuthorizationRequestException extends RuntimeException {
|
||||
/**
|
||||
* default serialVersionUID
|
||||
@@ -38,76 +42,4 @@ public class InvalidAuthorizationRequestException extends RuntimeException {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the redirect uri.
|
||||
*
|
||||
* @return the redirect uri
|
||||
*/
|
||||
public URI getRedirectUri() {
|
||||
return redirectUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the redirect uri.
|
||||
*
|
||||
* @param redirectUri the new redirect uri
|
||||
*/
|
||||
public void setRedirectUri(URI redirectUri) {
|
||||
this.redirectUri = redirectUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the error code.
|
||||
*
|
||||
* @return the error code
|
||||
*/
|
||||
public OidcAuthorizationErrorCode getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the error code.
|
||||
*
|
||||
* @param errorCode the new error code
|
||||
*/
|
||||
public void setErrorCode(OidcAuthorizationErrorCode errorCode) {
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the error description.
|
||||
*
|
||||
* @return the error description
|
||||
*/
|
||||
public String getErrorDescription() {
|
||||
return errorDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the error description.
|
||||
*
|
||||
* @param errorDescription the new error description
|
||||
*/
|
||||
public void setErrorDescription(String errorDescription) {
|
||||
this.errorDescription = errorDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the state.
|
||||
*
|
||||
* @return the state
|
||||
*/
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the state.
|
||||
*
|
||||
* @param state the new state
|
||||
*/
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-36
@@ -4,10 +4,14 @@
|
||||
package de.bstly.we.oidc.businesslogic.exception;
|
||||
|
||||
import de.bstly.we.oidc.businesslogic.model.OidcTokenErrorCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class InvalidTokenRequestException.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class InvalidTokenRequestException extends RuntimeException {
|
||||
|
||||
/**
|
||||
@@ -30,40 +34,4 @@ public class InvalidTokenRequestException extends RuntimeException {
|
||||
this.errorDescription = errorDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the error code.
|
||||
*
|
||||
* @return the error code
|
||||
*/
|
||||
public OidcTokenErrorCode getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the error code.
|
||||
*
|
||||
* @param errorCode the new error code
|
||||
*/
|
||||
public void setErrorCode(OidcTokenErrorCode errorCode) {
|
||||
this.errorCode = errorCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the error description.
|
||||
*
|
||||
* @return the error description
|
||||
*/
|
||||
public String getErrorDescription() {
|
||||
return errorDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the error description.
|
||||
*
|
||||
* @param errorDescription the new error description
|
||||
*/
|
||||
public void setErrorDescription(String errorDescription) {
|
||||
this.errorDescription = errorDescription;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,10 +9,14 @@ import java.time.temporal.ChronoUnit;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcAuthorizationCode.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class OidcAuthorizationCode {
|
||||
|
||||
public static final int CODE_LENGTH = 32;
|
||||
@@ -47,99 +51,5 @@ public class OidcAuthorizationCode {
|
||||
this.nonce = nonce;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client id.
|
||||
*
|
||||
* @return the client id
|
||||
*/
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the redirect uri.
|
||||
*
|
||||
* @return the redirect uri
|
||||
*/
|
||||
public URI getRedirectUri() {
|
||||
return redirectUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scopes.
|
||||
*
|
||||
* @return the scopes
|
||||
*/
|
||||
public Set<String> getScopes() {
|
||||
return scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the code.
|
||||
*
|
||||
* @return the code
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the expiry.
|
||||
*
|
||||
* @return the expiry
|
||||
*/
|
||||
public Instant getExpiry() {
|
||||
return expiry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user id.
|
||||
*
|
||||
* @return the user id
|
||||
*/
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the nonce.
|
||||
*
|
||||
* @return the nonce
|
||||
*/
|
||||
public String getNonce() {
|
||||
return nonce;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the spring session.
|
||||
*
|
||||
* @return the spring session
|
||||
*/
|
||||
public String getSpringSession() {
|
||||
return springSession;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the spring session.
|
||||
*
|
||||
* @param springSession the new spring session
|
||||
*/
|
||||
public void setSpringSession(String springSession) {
|
||||
this.springSession = springSession;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the alias
|
||||
*/
|
||||
public String getAlias() {
|
||||
return alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param alias the alias to set
|
||||
*/
|
||||
public void setAlias(String alias) {
|
||||
this.alias = alias;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+7
-253
@@ -5,9 +5,16 @@ package de.bstly.we.oidc.businesslogic.model;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcAuthorizationRequest.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class OidcAuthorizationRequest {
|
||||
|
||||
private String code;
|
||||
@@ -25,258 +32,5 @@ public class OidcAuthorizationRequest {
|
||||
private String login_hint;
|
||||
private String acr_values;
|
||||
|
||||
/**
|
||||
* Instantiates a new oidc authorization request.
|
||||
*
|
||||
* @param code the code
|
||||
* @param client_id the client id
|
||||
* @param response_type the response type
|
||||
* @param redirect_uri the redirect uri
|
||||
* @param scope the scope
|
||||
* @param state the state
|
||||
* @param nonce the nonce
|
||||
* @param display the display
|
||||
* @param prompt the prompt
|
||||
* @param max_age the max age
|
||||
* @param ui_locales the ui locales
|
||||
* @param id_token_hint the id token hint
|
||||
* @param login_hint the login hint
|
||||
* @param acr_values the acr values
|
||||
*/
|
||||
public OidcAuthorizationRequest(String code, String client_id, String response_type, URI redirect_uri, String scope,
|
||||
String state, String nonce, String display, String prompt, String max_age, String ui_locales,
|
||||
String id_token_hint, String login_hint, String acr_values) {
|
||||
super();
|
||||
this.code = code;
|
||||
this.client_id = client_id;
|
||||
this.response_type = response_type;
|
||||
this.redirect_uri = redirect_uri;
|
||||
this.scope = scope;
|
||||
this.state = state;
|
||||
this.nonce = nonce;
|
||||
this.display = display;
|
||||
this.prompt = prompt;
|
||||
this.max_age = max_age;
|
||||
this.ui_locales = ui_locales;
|
||||
this.id_token_hint = id_token_hint;
|
||||
this.login_hint = login_hint;
|
||||
this.acr_values = acr_values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the code.
|
||||
*
|
||||
* @return the code
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the code.
|
||||
*
|
||||
* @param code the new code
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client id.
|
||||
*
|
||||
* @return the client id
|
||||
*/
|
||||
public String getClient_id() {
|
||||
return client_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the response type.
|
||||
*
|
||||
* @return the response type
|
||||
*/
|
||||
public String getResponse_type() {
|
||||
return response_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the redirect uri.
|
||||
*
|
||||
* @return the redirect uri
|
||||
*/
|
||||
public URI getRedirect_uri() {
|
||||
return redirect_uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scope.
|
||||
*
|
||||
* @return the scope
|
||||
*/
|
||||
public String getScope() {
|
||||
return scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the state.
|
||||
*
|
||||
* @return the state
|
||||
*/
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the state.
|
||||
*
|
||||
* @param state the new state
|
||||
*/
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the display.
|
||||
*
|
||||
* @return the display
|
||||
*/
|
||||
public String getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the display.
|
||||
*
|
||||
* @param display the new display
|
||||
*/
|
||||
public void setDisplay(String display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the nonce.
|
||||
*
|
||||
* @return the nonce
|
||||
*/
|
||||
public String getNonce() {
|
||||
return nonce;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the nonce.
|
||||
*
|
||||
* @param nonce the new nonce
|
||||
*/
|
||||
public void setNonce(String nonce) {
|
||||
this.nonce = nonce;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the prompt.
|
||||
*
|
||||
* @return the prompt
|
||||
*/
|
||||
public String getPrompt() {
|
||||
return prompt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the prompt.
|
||||
*
|
||||
* @param prompt the new prompt
|
||||
*/
|
||||
public void setPrompt(String prompt) {
|
||||
this.prompt = prompt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the max age.
|
||||
*
|
||||
* @return the max age
|
||||
*/
|
||||
public String getMax_age() {
|
||||
return max_age;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the max age.
|
||||
*
|
||||
* @param max_age the new max age
|
||||
*/
|
||||
public void setMax_age(String max_age) {
|
||||
this.max_age = max_age;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ui locales.
|
||||
*
|
||||
* @return the ui locales
|
||||
*/
|
||||
public String getUi_locales() {
|
||||
return ui_locales;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the ui locales.
|
||||
*
|
||||
* @param ui_locales the new ui locales
|
||||
*/
|
||||
public void setUi_locales(String ui_locales) {
|
||||
this.ui_locales = ui_locales;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the id token hint.
|
||||
*
|
||||
* @return the id token hint
|
||||
*/
|
||||
public String getId_token_hint() {
|
||||
return id_token_hint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id token hint.
|
||||
*
|
||||
* @param id_token_hint the new id token hint
|
||||
*/
|
||||
public void setId_token_hint(String id_token_hint) {
|
||||
this.id_token_hint = id_token_hint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the login hint.
|
||||
*
|
||||
* @return the login hint
|
||||
*/
|
||||
public String getLogin_hint() {
|
||||
return login_hint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the login hint.
|
||||
*
|
||||
* @param login_hint the new login hint
|
||||
*/
|
||||
public void setLogin_hint(String login_hint) {
|
||||
this.login_hint = login_hint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the acr values.
|
||||
*
|
||||
* @return the acr values
|
||||
*/
|
||||
public String getAcr_values() {
|
||||
return acr_values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the acr values.
|
||||
*
|
||||
* @param acr_values the new acr values
|
||||
*/
|
||||
public void setAcr_values(String acr_values) {
|
||||
this.acr_values = acr_values;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,9 +5,16 @@ package de.bstly.we.oidc.businesslogic.model;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcTokenRequest.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class OidcTokenRequest {
|
||||
|
||||
private final String code;
|
||||
@@ -18,117 +25,5 @@ public class OidcTokenRequest {
|
||||
private final URI redirect_uri;
|
||||
private final String scope;
|
||||
|
||||
/**
|
||||
* Instantiates a new oidc token request.
|
||||
*
|
||||
* @param code the code
|
||||
* @param grant_type the grant type
|
||||
* @param client_id the client id
|
||||
* @param client_secret the client secret
|
||||
* @param refresh_token the refresh token
|
||||
* @param redirect_uri the redirect uri
|
||||
* @param scope the scope
|
||||
*/
|
||||
public OidcTokenRequest(String code, OidcAuthorizationGrantType grant_type, String client_id, String client_secret,
|
||||
String refresh_token, URI redirect_uri, String scope) {
|
||||
super();
|
||||
this.code = code;
|
||||
this.grant_type = grant_type;
|
||||
this.client_id = client_id;
|
||||
this.client_secret = client_secret;
|
||||
this.refresh_token = refresh_token;
|
||||
this.redirect_uri = redirect_uri;
|
||||
this.scope = scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client id.
|
||||
*
|
||||
* @return the client id
|
||||
*/
|
||||
public String getClient_id() {
|
||||
return client_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client id.
|
||||
*
|
||||
* @param client_id the new client id
|
||||
*/
|
||||
public void setClient_id(String client_id) {
|
||||
this.client_id = client_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret.
|
||||
*
|
||||
* @return the client secret
|
||||
*/
|
||||
public String getClient_secret() {
|
||||
return client_secret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client secret.
|
||||
*
|
||||
* @param client_secret the new client secret
|
||||
*/
|
||||
public void setClient_secret(String client_secret) {
|
||||
this.client_secret = client_secret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the refresh token.
|
||||
*
|
||||
* @return the refresh token
|
||||
*/
|
||||
public String getRefresh_token() {
|
||||
return refresh_token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the refresh token.
|
||||
*
|
||||
* @param refresh_token the new refresh token
|
||||
*/
|
||||
public void setRefresh_token(String refresh_token) {
|
||||
this.refresh_token = refresh_token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the code.
|
||||
*
|
||||
* @return the code
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the grant type.
|
||||
*
|
||||
* @return the grant type
|
||||
*/
|
||||
public OidcAuthorizationGrantType getGrant_type() {
|
||||
return grant_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the redirect uri.
|
||||
*
|
||||
* @return the redirect uri
|
||||
*/
|
||||
public URI getRedirect_uri() {
|
||||
return redirect_uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scope.
|
||||
*
|
||||
* @return the scope
|
||||
*/
|
||||
public String getScope() {
|
||||
return scope;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,11 +4,15 @@
|
||||
package de.bstly.we.oidc.businesslogic.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcTokenResponse.
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
@Getter
|
||||
@Setter
|
||||
public class OidcTokenResponse {
|
||||
|
||||
private String access_token;
|
||||
@@ -17,94 +21,4 @@ public class OidcTokenResponse {
|
||||
private long expires_in;
|
||||
private String id_token;
|
||||
|
||||
/**
|
||||
* Gets the access token.
|
||||
*
|
||||
* @return the access token
|
||||
*/
|
||||
public String getAccess_token() {
|
||||
return access_token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the access token.
|
||||
*
|
||||
* @param access_token the new access token
|
||||
*/
|
||||
public void setAccess_token(String access_token) {
|
||||
this.access_token = access_token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token type.
|
||||
*
|
||||
* @return the token type
|
||||
*/
|
||||
public String getToken_type() {
|
||||
return token_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the token type.
|
||||
*
|
||||
* @param token_type the new token type
|
||||
*/
|
||||
public void setToken_type(String token_type) {
|
||||
this.token_type = token_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the refresh token.
|
||||
*
|
||||
* @return the refresh token
|
||||
*/
|
||||
public String getRefresh_token() {
|
||||
return refresh_token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the refresh token.
|
||||
*
|
||||
* @param refresh_token the new refresh token
|
||||
*/
|
||||
public void setRefresh_token(String refresh_token) {
|
||||
this.refresh_token = refresh_token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the expires in.
|
||||
*
|
||||
* @return the expires in
|
||||
*/
|
||||
public long getExpires_in() {
|
||||
return expires_in;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the expires in.
|
||||
*
|
||||
* @param expires_in the new expires in
|
||||
*/
|
||||
public void setExpires_in(long expires_in) {
|
||||
this.expires_in = expires_in;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the id token.
|
||||
*
|
||||
* @return the id token
|
||||
*/
|
||||
public String getId_token() {
|
||||
return id_token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id token.
|
||||
*
|
||||
* @param id_token the new id token
|
||||
*/
|
||||
public void setId_token(String id_token) {
|
||||
this.id_token = id_token;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-36
@@ -3,48 +3,17 @@
|
||||
*/
|
||||
package de.bstly.we.oidc.businesslogic.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcTokenRevokeRequest.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class OidcTokenRevokeRequest {
|
||||
|
||||
private String token;
|
||||
private String token_type_hint;
|
||||
|
||||
/**
|
||||
* Gets the token.
|
||||
*
|
||||
* @return the token
|
||||
*/
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the token.
|
||||
*
|
||||
* @param token the new token
|
||||
*/
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token type hint.
|
||||
*
|
||||
* @return the token type hint
|
||||
*/
|
||||
public String getToken_type_hint() {
|
||||
return token_type_hint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the token type hint.
|
||||
*
|
||||
* @param token_type_hint the new token type hint
|
||||
*/
|
||||
public void setToken_type_hint(String token_type_hint) {
|
||||
this.token_type_hint = token_type_hint;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,10 +8,14 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import de.bstly.we.oidc.model.OidcSession;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcClientInfo.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class OidcClientInfo {
|
||||
|
||||
private String clientId;
|
||||
@@ -28,239 +32,4 @@ public class OidcClientInfo {
|
||||
private Map<String, Object> claims;
|
||||
private List<OidcSession> sessions;
|
||||
|
||||
/**
|
||||
* Gets the client id.
|
||||
*
|
||||
* @return the client id
|
||||
*/
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client id.
|
||||
*
|
||||
* @param clientId the new client id
|
||||
*/
|
||||
public void setClientId(String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name.
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the name.
|
||||
*
|
||||
* @param name the new name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the description.
|
||||
*
|
||||
* @return the description
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the description.
|
||||
*
|
||||
* @param description the new description
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the login url.
|
||||
*
|
||||
* @return the login url
|
||||
*/
|
||||
public String getLoginUrl() {
|
||||
return loginUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the login url.
|
||||
*
|
||||
* @param loginUrl the new login url
|
||||
*/
|
||||
public void setLoginUrl(String loginUrl) {
|
||||
this.loginUrl = loginUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the frontchannel logout uri.
|
||||
*
|
||||
* @return the frontchannel logout uri
|
||||
*/
|
||||
public String getFrontchannelLogoutUri() {
|
||||
return frontchannelLogoutUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the frontchannel logout uri.
|
||||
*
|
||||
* @param frontchannelLogoutUri the new frontchannel logout uri
|
||||
*/
|
||||
public void setFrontchannelLogoutUri(String frontchannelLogoutUri) {
|
||||
this.frontchannelLogoutUri = frontchannelLogoutUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if is frontchannel logout session required.
|
||||
*
|
||||
* @return true, if is frontchannel logout session required
|
||||
*/
|
||||
public boolean isFrontchannelLogoutSessionRequired() {
|
||||
return frontchannelLogoutSessionRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the frontchannel logout session required.
|
||||
*
|
||||
* @param frontchannelLogoutSessionRequired the new frontchannel logout session
|
||||
* required
|
||||
*/
|
||||
public void setFrontchannelLogoutSessionRequired(boolean frontchannelLogoutSessionRequired) {
|
||||
this.frontchannelLogoutSessionRequired = frontchannelLogoutSessionRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if is backchannel logout.
|
||||
*
|
||||
* @return true, if is backchannel logout
|
||||
*/
|
||||
public boolean isBackchannelLogout() {
|
||||
return backchannelLogout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the backchannel logout.
|
||||
*
|
||||
* @param backchannelLogout the new backchannel logout
|
||||
*/
|
||||
public void setBackchannelLogout(boolean backchannelLogout) {
|
||||
this.backchannelLogout = backchannelLogout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if is authorize.
|
||||
*
|
||||
* @return true, if is authorize
|
||||
*/
|
||||
public boolean isAuthorize() {
|
||||
return authorize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the authorize.
|
||||
*
|
||||
* @param authorize the new authorize
|
||||
*/
|
||||
public void setAuthorize(boolean authorize) {
|
||||
this.authorize = authorize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scopes.
|
||||
*
|
||||
* @return the scopes
|
||||
*/
|
||||
public Set<String> getScopes() {
|
||||
return scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the scopes.
|
||||
*
|
||||
* @param scopes the new scopes
|
||||
*/
|
||||
public void setScopes(Set<String> scopes) {
|
||||
this.scopes = scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the claim mapping.
|
||||
*
|
||||
* @return the claim mapping
|
||||
*/
|
||||
public Map<String, Set<String>> getClaimMapping() {
|
||||
return claimMapping;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the claim mapping.
|
||||
*
|
||||
* @param claimMapping the claim mapping
|
||||
*/
|
||||
public void setClaimMapping(Map<String, Set<String>> claimMapping) {
|
||||
this.claimMapping = claimMapping;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the authorized scopes.
|
||||
*
|
||||
* @return the authorized scopes
|
||||
*/
|
||||
public Set<String> getAuthorizedScopes() {
|
||||
return authorizedScopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the authorized scopes.
|
||||
*
|
||||
* @param authorizedScopes the new authorized scopes
|
||||
*/
|
||||
public void setAuthorizedScopes(Set<String> authorizedScopes) {
|
||||
this.authorizedScopes = authorizedScopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the claims.
|
||||
*
|
||||
* @return the claims
|
||||
*/
|
||||
public Map<String, Object> getClaims() {
|
||||
return claims;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the claims.
|
||||
*
|
||||
* @param claims the claims
|
||||
*/
|
||||
public void setClaims(Map<String, Object> claims) {
|
||||
this.claims = claims;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the sessions.
|
||||
*
|
||||
* @return the sessions
|
||||
*/
|
||||
public List<OidcSession> getSessions() {
|
||||
return sessions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the sessions.
|
||||
*
|
||||
* @param sessions the new sessions
|
||||
*/
|
||||
public void setSessions(List<OidcSession> sessions) {
|
||||
this.sessions = sessions;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,10 +7,14 @@ import java.util.Set;
|
||||
|
||||
import de.bstly.we.oidc.businesslogic.model.OidcAuthorizationGrantType;
|
||||
import de.bstly.we.oidc.businesslogic.model.OidcClientAuthenticationMethod;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcClientModel.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class OidcClientModel {
|
||||
|
||||
private String name;
|
||||
@@ -21,130 +25,4 @@ public class OidcClientModel {
|
||||
private String loginUrl;
|
||||
private boolean alwaysPermitted;
|
||||
|
||||
/**
|
||||
* Gets the name.
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the name.
|
||||
*
|
||||
* @param name the new name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the registered redirect uris.
|
||||
*
|
||||
* @return the registered redirect uris
|
||||
*/
|
||||
public Set<String> getRegisteredRedirectUris() {
|
||||
return registeredRedirectUris;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the registered redirect uris.
|
||||
*
|
||||
* @param registeredRedirectUris the new registered redirect uris
|
||||
*/
|
||||
public void setRegisteredRedirectUris(Set<String> registeredRedirectUris) {
|
||||
this.registeredRedirectUris = registeredRedirectUris;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client authentication methods.
|
||||
*
|
||||
* @return the client authentication methods
|
||||
*/
|
||||
public Set<OidcClientAuthenticationMethod> getClientAuthenticationMethods() {
|
||||
return clientAuthenticationMethods;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client authentication methods.
|
||||
*
|
||||
* @param clientAuthenticationMethods the new client authentication methods
|
||||
*/
|
||||
public void setClientAuthenticationMethods(Set<OidcClientAuthenticationMethod> clientAuthenticationMethods) {
|
||||
this.clientAuthenticationMethods = clientAuthenticationMethods;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the authorization grant types.
|
||||
*
|
||||
* @return the authorization grant types
|
||||
*/
|
||||
public Set<OidcAuthorizationGrantType> getAuthorizationGrantTypes() {
|
||||
return authorizationGrantTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the authorization grant types.
|
||||
*
|
||||
* @param authorizationGrantTypes the new authorization grant types
|
||||
*/
|
||||
public void setAuthorizationGrantTypes(Set<OidcAuthorizationGrantType> authorizationGrantTypes) {
|
||||
this.authorizationGrantTypes = authorizationGrantTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scopes.
|
||||
*
|
||||
* @return the scopes
|
||||
*/
|
||||
public Set<String> getScopes() {
|
||||
return scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the scopes.
|
||||
*
|
||||
* @param scopes the new scopes
|
||||
*/
|
||||
public void setScopes(Set<String> scopes) {
|
||||
this.scopes = scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the login url.
|
||||
*
|
||||
* @return the login url
|
||||
*/
|
||||
public String getLoginUrl() {
|
||||
return loginUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the login url.
|
||||
*
|
||||
* @param loginUrl the new login url
|
||||
*/
|
||||
public void setLoginUrl(String loginUrl) {
|
||||
this.loginUrl = loginUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if is always permitted.
|
||||
*
|
||||
* @return true, if is always permitted
|
||||
*/
|
||||
public boolean isAlwaysPermitted() {
|
||||
return alwaysPermitted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the always permitted.
|
||||
*
|
||||
* @param alwaysPermitted the new always permitted
|
||||
*/
|
||||
public void setAlwaysPermitted(boolean alwaysPermitted) {
|
||||
this.alwaysPermitted = alwaysPermitted;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,10 +5,14 @@ package de.bstly.we.oidc.controller.model;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcConfiguration.
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class OidcConfiguration {
|
||||
|
||||
private String issuer;
|
||||
@@ -23,193 +27,4 @@ public class OidcConfiguration {
|
||||
private Set<String> token_endpoint_auth_methods_supported;
|
||||
private Set<String> id_token_signing_alg_values_supported;
|
||||
|
||||
/**
|
||||
* Gets the issuer.
|
||||
*
|
||||
* @return the issuer
|
||||
*/
|
||||
public String getIssuer() {
|
||||
return issuer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the issuer.
|
||||
*
|
||||
* @param issuer the new issuer
|
||||
*/
|
||||
public void setIssuer(String issuer) {
|
||||
this.issuer = issuer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the authorization endpoint.
|
||||
*
|
||||
* @return the authorization endpoint
|
||||
*/
|
||||
public URI getAuthorization_endpoint() {
|
||||
return authorization_endpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the authorization endpoint.
|
||||
*
|
||||
* @param authorization_endpoint the new authorization endpoint
|
||||
*/
|
||||
public void setAuthorization_endpoint(URI authorization_endpoint) {
|
||||
this.authorization_endpoint = authorization_endpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token endpoint.
|
||||
*
|
||||
* @return the token endpoint
|
||||
*/
|
||||
public URI getToken_endpoint() {
|
||||
return token_endpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the token endpoint.
|
||||
*
|
||||
* @param token_endpoint the new token endpoint
|
||||
*/
|
||||
public void setToken_endpoint(URI token_endpoint) {
|
||||
this.token_endpoint = token_endpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the userinfo endpoint.
|
||||
*
|
||||
* @return the userinfo endpoint
|
||||
*/
|
||||
public URI getUserinfo_endpoint() {
|
||||
return userinfo_endpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the userinfo endpoint.
|
||||
*
|
||||
* @param userinfo_endpoint the new userinfo endpoint
|
||||
*/
|
||||
public void setUserinfo_endpoint(URI userinfo_endpoint) {
|
||||
this.userinfo_endpoint = userinfo_endpoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the jwks uri.
|
||||
*
|
||||
* @return the jwks uri
|
||||
*/
|
||||
public URI getJwks_uri() {
|
||||
return jwks_uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the jwks uri.
|
||||
*
|
||||
* @param jwks_uri the new jwks uri
|
||||
*/
|
||||
public void setJwks_uri(URI jwks_uri) {
|
||||
this.jwks_uri = jwks_uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scopes supported.
|
||||
*
|
||||
* @return the scopes supported
|
||||
*/
|
||||
public Set<String> getScopes_supported() {
|
||||
return scopes_supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the scopes supported.
|
||||
*
|
||||
* @param scopes_supported the new scopes supported
|
||||
*/
|
||||
public void setScopes_supported(Set<String> scopes_supported) {
|
||||
this.scopes_supported = scopes_supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the response types supported.
|
||||
*
|
||||
* @return the response types supported
|
||||
*/
|
||||
public Set<String> getResponse_types_supported() {
|
||||
return response_types_supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the response types supported.
|
||||
*
|
||||
* @param response_types_supported the new response types supported
|
||||
*/
|
||||
public void setResponse_types_supported(Set<String> response_types_supported) {
|
||||
this.response_types_supported = response_types_supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the subject types supported.
|
||||
*
|
||||
* @return the subject types supported
|
||||
*/
|
||||
public Set<String> getSubject_types_supported() {
|
||||
return subject_types_supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the subject types supported.
|
||||
*
|
||||
* @param subject_types_supported the new subject types supported
|
||||
*/
|
||||
public void setSubject_types_supported(Set<String> subject_types_supported) {
|
||||
this.subject_types_supported = subject_types_supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the grant types supported.
|
||||
*
|
||||
* @return the grant types supported
|
||||
*/
|
||||
public Set<String> getGrant_types_supported() {
|
||||
return grant_types_supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the grant types supported.
|
||||
*
|
||||
* @param grant_types_supported the new grant types supported
|
||||
*/
|
||||
public void setGrant_types_supported(Set<String> grant_types_supported) {
|
||||
this.grant_types_supported = grant_types_supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token endpoint auth methods supported.
|
||||
*
|
||||
* @return the token endpoint auth methods supported
|
||||
*/
|
||||
public Set<String> getToken_endpoint_auth_methods_supported() {
|
||||
return token_endpoint_auth_methods_supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the token endpoint auth methods supported.
|
||||
*
|
||||
* @param token_endpoint_auth_methods_supported the new token endpoint auth
|
||||
* methods supported
|
||||
*/
|
||||
public void setToken_endpoint_auth_methods_supported(Set<String> token_endpoint_auth_methods_supported) {
|
||||
this.token_endpoint_auth_methods_supported = token_endpoint_auth_methods_supported;
|
||||
}
|
||||
|
||||
public Set<String> getId_token_signing_alg_values_supported() {
|
||||
return id_token_signing_alg_values_supported;
|
||||
}
|
||||
|
||||
public void setId_token_signing_alg_values_supported(Set<String> id_token_signing_alg_values_supported) {
|
||||
this.id_token_signing_alg_values_supported = id_token_signing_alg_values_supported;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,12 +14,16 @@ import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcAuthorization.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "oidc_authorizations")
|
||||
@Getter
|
||||
@Setter
|
||||
public class OidcAuthorization {
|
||||
|
||||
@Id
|
||||
@@ -34,43 +38,7 @@ public class OidcAuthorization {
|
||||
@CollectionTable(name = "oidc_authorizations_scopes")
|
||||
private Set<String> scopes;
|
||||
|
||||
/**
|
||||
* Gets the client.
|
||||
*
|
||||
* @return the client
|
||||
*/
|
||||
public Long getClient() {
|
||||
return client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client.
|
||||
*
|
||||
* @param client the new client
|
||||
*/
|
||||
public void setClient(Long client) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the subject.
|
||||
*
|
||||
* @return the subject
|
||||
*/
|
||||
public Long getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the subject.
|
||||
*
|
||||
* @param subject the new subject
|
||||
*/
|
||||
public void setSubject(Long subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Gets the scopes.
|
||||
*
|
||||
* @return the scopes
|
||||
@@ -78,14 +46,4 @@ public class OidcAuthorization {
|
||||
public Set<String> getScopes() {
|
||||
return scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the scopes.
|
||||
*
|
||||
* @param scopes the new scopes
|
||||
*/
|
||||
public void setScopes(Set<String> scopes) {
|
||||
this.scopes = scopes;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,12 +18,16 @@ import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcClient.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "oidc_clients")
|
||||
@Getter
|
||||
@Setter
|
||||
public class OidcClient {
|
||||
|
||||
@Id
|
||||
@@ -75,354 +79,4 @@ public class OidcClient {
|
||||
@Column(name = "category")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* Gets the id.
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id.
|
||||
*
|
||||
* @param id the new id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client name.
|
||||
*
|
||||
* @return the client name
|
||||
*/
|
||||
public String getClientName() {
|
||||
return clientName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client name.
|
||||
*
|
||||
* @param clientName the new client name
|
||||
*/
|
||||
public void setClientName(String clientName) {
|
||||
this.clientName = clientName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client id.
|
||||
*
|
||||
* @return the client id
|
||||
*/
|
||||
public String getClientId() {
|
||||
return clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client id.
|
||||
*
|
||||
* @param clientId the new client id
|
||||
*/
|
||||
public void setClientId(String clientId) {
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client secret.
|
||||
*
|
||||
* @return the client secret
|
||||
*/
|
||||
public String getClientSecret() {
|
||||
return clientSecret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client secret.
|
||||
*
|
||||
* @param clientSecret the new client secret
|
||||
*/
|
||||
public void setClientSecret(String clientSecret) {
|
||||
this.clientSecret = clientSecret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client authentication methods.
|
||||
*
|
||||
* @return the client authentication methods
|
||||
*/
|
||||
public Set<OidcClientAuthenticationMethod> getClientAuthenticationMethods() {
|
||||
return clientAuthenticationMethods;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client authentication methods.
|
||||
*
|
||||
* @param clientAuthenticationMethods the new client authentication methods
|
||||
*/
|
||||
public void setClientAuthenticationMethods(Set<OidcClientAuthenticationMethod> clientAuthenticationMethods) {
|
||||
this.clientAuthenticationMethods = clientAuthenticationMethods;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the authorization grant types.
|
||||
*
|
||||
* @return the authorization grant types
|
||||
*/
|
||||
public Set<OidcAuthorizationGrantType> getAuthorizationGrantTypes() {
|
||||
return authorizationGrantTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the authorization grant types.
|
||||
*
|
||||
* @param authorizationGrantTypes the new authorization grant types
|
||||
*/
|
||||
public void setAuthorizationGrantTypes(Set<OidcAuthorizationGrantType> authorizationGrantTypes) {
|
||||
this.authorizationGrantTypes = authorizationGrantTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the redirect uris.
|
||||
*
|
||||
* @return the redirect uris
|
||||
*/
|
||||
public Set<String> getRedirectUris() {
|
||||
return redirectUris;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the redirect uris.
|
||||
*
|
||||
* @param redirectUris the new redirect uris
|
||||
*/
|
||||
public void setRedirectUris(Set<String> redirectUris) {
|
||||
this.redirectUris = redirectUris;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scopes.
|
||||
*
|
||||
* @return the scopes
|
||||
*/
|
||||
public Set<String> getScopes() {
|
||||
return scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the scopes.
|
||||
*
|
||||
* @param scopes the new scopes
|
||||
*/
|
||||
public void setScopes(Set<String> scopes) {
|
||||
this.scopes = scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token lifetime.
|
||||
*
|
||||
* @return the token lifetime
|
||||
*/
|
||||
public Long getTokenLifetime() {
|
||||
return tokenLifetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the token lifetime.
|
||||
*
|
||||
* @param tokenLifetime the new token lifetime
|
||||
*/
|
||||
public void setTokenLifetime(Long tokenLifetime) {
|
||||
this.tokenLifetime = tokenLifetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the login url.
|
||||
*
|
||||
* @return the login url
|
||||
*/
|
||||
public String getLoginUrl() {
|
||||
return loginUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the login url.
|
||||
*
|
||||
* @param loginUrl the new login url
|
||||
*/
|
||||
public void setLoginUrl(String loginUrl) {
|
||||
this.loginUrl = loginUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the frontchannel logout uri.
|
||||
*
|
||||
* @return the frontchannel logout uri
|
||||
*/
|
||||
public String getFrontchannelLogoutUri() {
|
||||
return frontchannelLogoutUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the frontchannel logout uri.
|
||||
*
|
||||
* @param frontchannelLogoutUri the new frontchannel logout uri
|
||||
*/
|
||||
public void setFrontchannelLogoutUri(String frontchannelLogoutUri) {
|
||||
this.frontchannelLogoutUri = frontchannelLogoutUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if is frontchannel logout session required.
|
||||
*
|
||||
* @return true, if is frontchannel logout session required
|
||||
*/
|
||||
public boolean isFrontchannelLogoutSessionRequired() {
|
||||
return frontchannelLogoutSessionRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the frontchannel logout session required.
|
||||
*
|
||||
* @param frontchannelLogoutSessionRequired the new frontchannel logout session
|
||||
* required
|
||||
*/
|
||||
public void setFrontchannelLogoutSessionRequired(boolean frontchannelLogoutSessionRequired) {
|
||||
this.frontchannelLogoutSessionRequired = frontchannelLogoutSessionRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the backchannel logout uri.
|
||||
*
|
||||
* @return the backchannel logout uri
|
||||
*/
|
||||
public String getBackchannelLogoutUri() {
|
||||
return backchannelLogoutUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the backchannel logout uri.
|
||||
*
|
||||
* @param backchannelLogoutUri the new backchannel logout uri
|
||||
*/
|
||||
public void setBackchannelLogoutUri(String backchannelLogoutUri) {
|
||||
this.backchannelLogoutUri = backchannelLogoutUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if is backchannel logout session required.
|
||||
*
|
||||
* @return true, if is backchannel logout session required
|
||||
*/
|
||||
public boolean isBackchannelLogoutSessionRequired() {
|
||||
return backchannelLogoutSessionRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the backchannel logout session required.
|
||||
*
|
||||
* @param backchannelLogoutSessionRequired the new backchannel logout session
|
||||
* required
|
||||
*/
|
||||
public void setBackchannelLogoutSessionRequired(boolean backchannelLogoutSessionRequired) {
|
||||
this.backchannelLogoutSessionRequired = backchannelLogoutSessionRequired;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if is authorize.
|
||||
*
|
||||
* @return true, if is authorize
|
||||
*/
|
||||
public boolean isAuthorize() {
|
||||
return authorize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the authorize.
|
||||
*
|
||||
* @param authorize the new authorize
|
||||
*/
|
||||
public void setAuthorize(boolean authorize) {
|
||||
this.authorize = authorize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the aliasAllowed
|
||||
*/
|
||||
public boolean isAliasAllowed() {
|
||||
return aliasAllowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param aliasAllowed the aliasAllowed to set
|
||||
*/
|
||||
public void setAliasAllowed(boolean aliasAllowed) {
|
||||
this.aliasAllowed = aliasAllowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the aliasQuota
|
||||
*/
|
||||
public boolean isAliasQuota() {
|
||||
return aliasQuota;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param aliasQuota the aliasQuota to set
|
||||
*/
|
||||
public void setAliasQuota(boolean aliasQuota) {
|
||||
this.aliasQuota = aliasQuota;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the aliasSubject
|
||||
*/
|
||||
public boolean isAliasSubject() {
|
||||
return aliasSubject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param aliasSubject the aliasSubject to set
|
||||
*/
|
||||
public void setAliasSubject(boolean aliasSubject) {
|
||||
this.aliasSubject = aliasSubject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if is always permitted.
|
||||
*
|
||||
* @return true, if is always permitted
|
||||
*/
|
||||
public boolean isAlwaysPermitted() {
|
||||
return alwaysPermitted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the always permitted.
|
||||
*
|
||||
* @param alwaysPermitted the new always permitted
|
||||
*/
|
||||
public void setAlwaysPermitted(boolean alwaysPermitted) {
|
||||
this.alwaysPermitted = alwaysPermitted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the category.
|
||||
*
|
||||
* @return the category
|
||||
*/
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the category.
|
||||
*
|
||||
* @param category the new category
|
||||
*/
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,12 +9,16 @@ import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcSession.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "oidc_sessions")
|
||||
@Getter
|
||||
@Setter
|
||||
public class OidcSession {
|
||||
|
||||
@Id
|
||||
@@ -22,7 +26,7 @@ public class OidcSession {
|
||||
@Column(name = "id")
|
||||
private Long id;
|
||||
@Column(name = "client_id")
|
||||
private Long client;
|
||||
private Long clientId;
|
||||
@Column(name = "subject")
|
||||
private Long subject;
|
||||
@Column(name = "sid")
|
||||
@@ -32,112 +36,4 @@ public class OidcSession {
|
||||
@Column(name = "spring_session_id")
|
||||
private String springSession;
|
||||
|
||||
/**
|
||||
* Gets the id.
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id.
|
||||
*
|
||||
* @param id the new id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client id.
|
||||
*
|
||||
* @return the client id
|
||||
*/
|
||||
public Long getClientId() {
|
||||
return client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client id.
|
||||
*
|
||||
* @param clientId the new client id
|
||||
*/
|
||||
public void setClientId(Long clientId) {
|
||||
this.client = clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the subject.
|
||||
*
|
||||
* @return the subject
|
||||
*/
|
||||
public Long getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the subject.
|
||||
*
|
||||
* @param subject the new subject
|
||||
*/
|
||||
public void setSubject(Long subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the sid.
|
||||
*
|
||||
* @return the sid
|
||||
*/
|
||||
public String getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the sid.
|
||||
*
|
||||
* @param sid the new sid
|
||||
*/
|
||||
public void setSid(String sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the id token.
|
||||
*
|
||||
* @return the id token
|
||||
*/
|
||||
public String getIdToken() {
|
||||
return idToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id token.
|
||||
*
|
||||
* @param idToken the new id token
|
||||
*/
|
||||
public void setIdToken(String idToken) {
|
||||
this.idToken = idToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the spring session.
|
||||
*
|
||||
* @return the spring session
|
||||
*/
|
||||
public String getSpringSession() {
|
||||
return springSession;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the spring session.
|
||||
*
|
||||
* @param springSession the new spring session
|
||||
*/
|
||||
public void setSpringSession(String springSession) {
|
||||
this.springSession = springSession;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,12 +16,16 @@ import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* The Class OidcToken.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "oidc_tokens")
|
||||
@Getter
|
||||
@Setter
|
||||
public class OidcToken {
|
||||
|
||||
@Id
|
||||
@@ -48,180 +52,4 @@ public class OidcToken {
|
||||
@ElementCollection(fetch = FetchType.EAGER)
|
||||
private Set<String> scopes;
|
||||
|
||||
/**
|
||||
* Gets the id.
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id.
|
||||
*
|
||||
* @param id the new id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the created.
|
||||
*
|
||||
* @return the created
|
||||
*/
|
||||
public Instant getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the created.
|
||||
*
|
||||
* @param created the new created
|
||||
*/
|
||||
public void setCreated(Instant created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user id.
|
||||
*
|
||||
* @return the user id
|
||||
*/
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user id.
|
||||
*
|
||||
* @param userId the new user id
|
||||
*/
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the alias
|
||||
*/
|
||||
public String getAlias() {
|
||||
return alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param alias the alias to set
|
||||
*/
|
||||
public void setAlias(String alias) {
|
||||
this.alias = alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the client.
|
||||
*
|
||||
* @return the client
|
||||
*/
|
||||
public Long getClient() {
|
||||
return client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client.
|
||||
*
|
||||
* @param client the new client
|
||||
*/
|
||||
public void setClient(Long client) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the access token.
|
||||
*
|
||||
* @return the access token
|
||||
*/
|
||||
public String getAccessToken() {
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the access token.
|
||||
*
|
||||
* @param accessToken the new access token
|
||||
*/
|
||||
public void setAccessToken(String accessToken) {
|
||||
this.accessToken = accessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the refresh token.
|
||||
*
|
||||
* @return the refresh token
|
||||
*/
|
||||
public String getRefreshToken() {
|
||||
return refreshToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the refresh token.
|
||||
*
|
||||
* @param refreshToken the new refresh token
|
||||
*/
|
||||
public void setRefreshToken(String refreshToken) {
|
||||
this.refreshToken = refreshToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the expires in.
|
||||
*
|
||||
* @return the expires in
|
||||
*/
|
||||
public Long getExpiresIn() {
|
||||
return expiresIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the expires in.
|
||||
*
|
||||
* @param expiresIn the new expires in
|
||||
*/
|
||||
public void setExpiresIn(Long expiresIn) {
|
||||
this.expiresIn = expiresIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the id token.
|
||||
*
|
||||
* @return the id token
|
||||
*/
|
||||
public String getIdToken() {
|
||||
return idToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the id token.
|
||||
*
|
||||
* @param idToken the new id token
|
||||
*/
|
||||
public void setIdToken(String idToken) {
|
||||
this.idToken = idToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the scopes.
|
||||
*
|
||||
* @return the scopes
|
||||
*/
|
||||
public Set<String> getScopes() {
|
||||
return scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the scopes.
|
||||
*
|
||||
* @param scopes the new scopes
|
||||
*/
|
||||
public void setScopes(Set<String> scopes) {
|
||||
this.scopes = scopes;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user