Credential Class — spring-boot Architecture
Architecture documentation for the Credential class in Credential.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/configuration/Credential.java lines 33–82
class Credential extends MappedObject {
/**
* If the secret being stored is an identity token, the username should be set to
* {@code <token>}.
*/
private static final String TOKEN_USERNAME = "<token>";
private final String username;
private final String secret;
private final @Nullable String serverUrl;
Credential(JsonNode node) {
super(node, MethodHandles.lookup());
this.username = extractUsername();
this.secret = extractSecret();
this.serverUrl = valueAt("/ServerURL", String.class);
}
private String extractSecret() {
String result = valueAt("/Secret", String.class);
Assert.state(result != null, "'result' must not be null");
return result;
}
private String extractUsername() {
String result = valueAt("/Username", String.class);
Assert.state(result != null, "'result' must not be null");
return result;
}
String getUsername() {
return this.username;
}
String getSecret() {
return this.secret;
}
@Nullable String getServerUrl() {
return this.serverUrl;
}
boolean isIdentityToken() {
return TOKEN_USERNAME.equals(this.username);
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free