@startuml
title API Application - Dynamic

top to bottom direction

!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!includeurl https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
LAYOUT_WITH_LEGEND()

Container(17, "Single-Page Application", "JavaScript and Angular", "Provides all of the Internet banking functionality to customers via their web browser.")
ContainerDb(21, "Database", "Oracle Database Schema", "Stores user registration information, hashed authentication credentials, access logs, etc.")

Container_Boundary("20_boundary", "API Application") {
  Component(29, "Sign In Controller", "Spring MVC Rest Controller", "Allows users to sign in to the Internet Banking System.")
  Component(32, "Security Component", "Spring Bean", "Provides functionality related to signing in, changing passwords, etc.")
}

Rel_D(17, 29, "1. Submits credentials to", "JSON/HTTPS")
Rel_D(29, 32, "2. Validates credentials using")
Rel_D(32, 21, "3. select * from users where username = ?", "JDBC")
Rel_D(21, 32, "4. Returns user data to", "JDBC")
Rel_D(32, 29, "5. Returns true if the hashed password matches")
Rel_D(29, 17, "6. Sends back an authentication token to", "JSON/HTTPS")
@enduml