mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-03 17:52:30 +02:00
fix(saml): correct ClassPathResource handling for IdP metadata and add null-guard for privateKey
This commit is contained in:
parent
3938a07c13
commit
029f2e9418
@ -197,7 +197,7 @@ public class ApplicationProperties {
|
|||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public InputStream getIdpMetadataUri() throws IOException {
|
public InputStream getIdpMetadataUri() throws IOException {
|
||||||
if (idpMetadataUri.startsWith("classpath:")) {
|
if (idpMetadataUri.startsWith("classpath:")) {
|
||||||
return new ClassPathResource(idpMetadataUri.substring("classpath".length()))
|
return new ClassPathResource(idpMetadataUri.substring("classpath:".length()))
|
||||||
.getInputStream();
|
.getInputStream();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -233,6 +233,7 @@ public class ApplicationProperties {
|
|||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public Resource getPrivateKey() {
|
public Resource getPrivateKey() {
|
||||||
|
if (privateKey == null) return null;
|
||||||
if (privateKey.startsWith("classpath:")) {
|
if (privateKey.startsWith("classpath:")) {
|
||||||
return new ClassPathResource(privateKey.substring("classpath:".length()));
|
return new ClassPathResource(privateKey.substring("classpath:".length()));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user