
be.looorent.security.jwt.AuthenticationProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-security-jwt Show documentation
Show all versions of spring-security-jwt Show documentation
Create stateless security on your Spring endpoints using JWT.
package be.looorent.security.jwt;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.io.UnsupportedEncodingException;
/**
* Properties used to do the actual authentication of the JWT.
* Also provide the route where requests must not be authenticated.
* @author Lorent Lempereur - [email protected]
*/
@Component
@ConfigurationProperties(prefix = "authentication")
class AuthenticationProperties {
private String tokenIssuer;
private byte[] tokenSecretKey;
private String publicRoute;
AuthenticationProperties() {}
public String getTokenIssuer() {
return tokenIssuer;
}
public byte[] getTokenSecretKey() {
return tokenSecretKey;
}
public String getPublicRoute() {
return publicRoute;
}
public void setTokenIssuer(String tokenIssuer) {
this.tokenIssuer = tokenIssuer;
}
public void setTokenSecretKey(String tokenSecretKey) throws UnsupportedEncodingException {
this.tokenSecretKey = tokenSecretKey.getBytes();
}
public void setPublicRoute(String publicRoute) {
this.publicRoute = publicRoute;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy