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
|
||||
public InputStream getIdpMetadataUri() throws IOException {
|
||||
if (idpMetadataUri.startsWith("classpath:")) {
|
||||
return new ClassPathResource(idpMetadataUri.substring("classpath".length()))
|
||||
return new ClassPathResource(idpMetadataUri.substring("classpath:".length()))
|
||||
.getInputStream();
|
||||
}
|
||||
try {
|
||||
@ -233,6 +233,7 @@ public class ApplicationProperties {
|
||||
|
||||
@JsonIgnore
|
||||
public Resource getPrivateKey() {
|
||||
if (privateKey == null) return null;
|
||||
if (privateKey.startsWith("classpath:")) {
|
||||
return new ClassPathResource(privateKey.substring("classpath:".length()));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user