use of com.yubico.webauthn.data.RelyingPartyIdentity in project java-webauthn-server by Yubico.
the class Config method computeRpIdentity.
private static RelyingPartyIdentity computeRpIdentity() throws MalformedURLException {
final String name = System.getenv("YUBICO_WEBAUTHN_RP_NAME");
final String id = System.getenv("YUBICO_WEBAUTHN_RP_ID");
logger.debug("RP name: {}", name);
logger.debug("RP ID: {}", id);
RelyingPartyIdentity.RelyingPartyIdentityBuilder resultBuilder = DEFAULT_RP_ID.toBuilder();
if (name == null) {
logger.debug("RP name not given - using default.");
} else {
resultBuilder.name(name);
}
if (id == null) {
logger.debug("RP ID not given - using default.");
} else {
resultBuilder.id(id);
}
final RelyingPartyIdentity result = resultBuilder.build();
logger.info("RP identity: {}", result);
return result;
}
Aggregations