NG Flow RC1

Propuesta NG-Flow, soporte para render nativos

sequenceDiagram
  autonumber
  participant Usuario
  participant Relying Party
  participant Hydra Public
  participant FrontSPA
  participant Hydra GW
  participant Hydra Admin
  participant Identity
  participant Channels
  participant IDP
  participant Audit
  Usuario->>+Relying Party: Intento de Login
  Relying Party-->>-Usuario: Login link
  Usuario->>Usuario: Click link
  Usuario->>+Hydra Public: Login request
  Hydra Public-->>-Usuario: 302 FrontSPA url
  Usuario->>+FrontSPA: GET ?login_challenge=35b0729eb065430d928d738188ccc1b9
  FrontSPA->>+Hydra GW: GET /auth/login?challenge=35b0729eb065430d928d738188ccc1b9
  Hydra GW->>+Hydra Admin: GET LoginRequest
  Hydra Admin-->>-Hydra GW: { LoginRequest }
  Hydra GW->>+Identity: POST { Credential } /wip/authentication/v1/available
  Identity-->>-Hydra GW: { AvailableAuthentications }
  
  rect rgb(200, 150, 255)
    opt Validate Enrollment if "upgrade" or "noop"
      Hydra GW->>+Identity: POST { RegID } /mvp/v0.1/persons/verify-recent-registration
      Identity-->>-Hydra GW: { RegistrationValidation }
    end
  end

  Hydra GW-->>-FrontSPA: { LoginChallengeResponse }
  FrontSPA-->>-Usuario: Render VIEW

  rect rgb(191, 223, 255)
    loop Submit Partial or Full
      Usuario->>+FrontSPA: Submit Data
      FrontSPA->>+Hydra GW: PUT { LoginCredentialRequest } /auth/login/submit?challenge=35b0729eb065430d928d738188ccc1b9
      Hydra GW->>+Hydra Admin: GET LoginRequest
      Hydra Admin-->>-Hydra GW: { LoginRequest }
      Hydra GW-->>-FrontSPA: { LoginChallengeResponse }
    end
  end
  
  FrontSPA->>+Identity: Submit Evidence ( GUSTAVO, PENDIENTE ENDPOINT )
  Identity-->>-FrontSPA: { EvidenceID }
  FrontSPA->>+Hydra GW: PUT /auth/login/accept?challenge=35b0729eb065430d928d738188ccc1b9
  Hydra GW->>+Identity: POST { ValidateEvidenceID } /rc/authentication/authenticate
  Identity-->>-Hydra GW: { AuthenticateValidation }
  Hydra GW->>+Hydra Admin: PUT AcceptLoginRequest
  Hydra Admin-->>-Hydra GW: { CompletedRequest }
  Hydra GW-->>-FrontSPA: { CompletedRequest }
  FrontSPA-->>-Usuario: 302 { CompletedRequest.RedirectURL }
  Usuario->>+FrontSPA: GET ?consent_challenge=598efc627d734b78907d3377a01412e5
  FrontSPA->>+Hydra GW: GET /auth/consent?consent_challenge=598efc627d734b78907d3377a01412e5
  Hydra GW->>+Hydra Admin: GET ConsentRequest
  Hydra Admin-->>-Hydra GW: { ConsentRequest }
  Hydra GW-->>-FrontSPA: { ConsentChallengeResponse }
  FrontSPA-->>-Usuario: Render VIEW
  Usuario->>+FrontSPA: Submit Consent
  FrontSPA->>+Hydra GW: PUT /auth/consent/accept?consent_challenge=598efc627d734b78907d3377a01412e5
  Hydra GW->>+IDP: GetProfile
  IDP-->>-Hydra GW: Profile
  Hydra GW->>+Audit: Create Audit
  Audit-->>-Hydra GW: Audit Number
  Hydra GW->>+Hydra Admin: PUT AcceptConsentRequest
  Hydra Admin-->>-Hydra GW: { CompletedRequest }
  Hydra GW-->>-FrontSPA: { CompletedRequest }
  FrontSPA-->>-Usuario: 302 { CompletedRequest.RedirectURL }
  Usuario->>+Relying Party: Callback+code
  Relying Party->>+Hydra Public: Token Exchange
  Hydra Public-->>-Relying Party: Tokens
  Relying Party-->>-Usuario: SUCCESS!