Home / Class/ Auth Class — spring-boot Architecture

Auth Class — spring-boot Architecture

Architecture documentation for the Auth class in DockerConfigurationMetadata.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/DockerConfigurationMetadata.java lines 214–255

	static final class Auth extends MappedObject {

		private final @Nullable String username;

		private final @Nullable String password;

		private final @Nullable String email;

		Auth(JsonNode node) {
			super(node, MethodHandles.lookup());
			String auth = valueAt("/auth", String.class);
			if (StringUtils.hasLength(auth)) {
				String[] parts = new String(Base64.getDecoder().decode(auth)).split(":", 2);
				Assert.state(parts.length == 2, "Malformed auth in docker configuration metadata");
				this.username = parts[0];
				this.password = trim(parts[1], Character.MIN_VALUE);
			}
			else {
				this.username = valueAt("/username", String.class);
				this.password = valueAt("/password", String.class);
			}
			this.email = valueAt("/email", String.class);
		}

		@Nullable String getUsername() {
			return this.username;
		}

		@Nullable String getPassword() {
			return this.password;
		}

		@Nullable String getEmail() {
			return this.email;
		}

		private static String trim(String source, char character) {
			source = StringUtils.trimLeadingCharacter(source, character);
			return StringUtils.trimTrailingCharacter(source, character);
		}

	}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free