diff --git a/docs/diagrams/signon-sign-in-from-whitehall-publisher.svg b/docs/diagrams/signon-sign-in-from-whitehall-publisher.svg new file mode 100644 index 000000000..374e8386c --- /dev/null +++ b/docs/diagrams/signon-sign-in-from-whitehall-publisher.svg @@ -0,0 +1 @@ +title%20User%20not%20signed-in%0A%0Aparticipant%20User%0Aparticipant%20Browser%0Aparticipant%20Whitehall%0Aparticipant%20Signon%0A%0AUser-%3EBrowser%3AVisits%20whitehall-admin.dev.gov.uk%2Fgovernment%2Fadmin%0ABrowser-%3EWhitehall%3AGET%20%2Fgovernment%2Fadmin%0AWhitehall--%3EBrowser%3ARedirect%20to%20%2Fauth%2Fgds%0ABrowser-%3EWhitehall%3AGET%20%2Fauth%2Fgds%0AWhitehall--%3EWhitehall%3AAuthentication%20fails%0AWhitehall--%3EBrowser%3ARedirect%20to%20signon.dev.gov.uk%2Foauth%2Fauthorize%0ABrowser-%3ESignon%3AGET%20%2Foauth%2Fauthorize%0ASignon--%3ESignon%3AUnauthorized%0ASignon--%3EBrowser%3ARedirect%20to%20%2Fusers%2Fsignin%0ABrowser-%3ESignon%3AGET%20%2Fusers%2Fsignin%0ASignon--%3EBrowser%3AOK%0A%0AUser-%3EBrowser%3AEnters%20email%20and%20password%20%26%20clicks%20Signin%20button%0ABrowser-%3ESignon%3APOST%20%2Fusers%2Fsign_in%0ASignon--%3EBrowser%3ARedirect%20to%20%2Foauth%2Fauthorize%0ABrowser-%3ESignon%3AGET%20%2Foauth%2Fauthorize%0ASignon--%3EBrowser%3ARedirect%20to%20whitehall-admin.dev.gov.uk%2Fauth%2Fgds%2Fcallback%0ABrowser-%3EWhitehall%3AGET%20%2Fauth%2Fgds%2Fcallback%0AWhitehall-%3ESignon%3APOST%20%2Foauth%2Faccess_token%0ASignon--%3EWhitehall%3AOK%0AWhitehall-%3ESignon%3AGET%20%2Fuser.json%20(w%2F%20bearer%20token)%0ASignon--%3EWhitehall%3AOK%0AWhitehall--%3EBrowser%3ARedirect%20to%20%2Fgovernment%2Fadmin%0ABrowser-%3EWhitehall%3AGET%20%2Fgovernment%2Fadmin%0AWhitehall--%3EBrowser%3A%20OK%0AUser not signed-inUserBrowserWhitehallSignonVisits whitehall-admin.dev.gov.uk/government/adminGET /government/adminRedirect to /auth/gdsGET /auth/gdsAuthentication failsRedirect to signon.dev.gov.uk/oauth/authorizeGET /oauth/authorizeUnauthorizedRedirect to /users/signinGET /users/signinOKEnters email and password & clicks Signin buttonPOST /users/sign_inRedirect to /oauth/authorizeGET /oauth/authorizeRedirect to whitehall-admin.dev.gov.uk/auth/gds/callbackGET /auth/gds/callbackPOST /oauth/access_tokenOKGET /user.json (w/ bearer token)OKRedirect to /government/adminGET /government/adminOK \ No newline at end of file diff --git a/docs/oauth.md b/docs/oauth.md index 44fd431df..414077b73 100644 --- a/docs/oauth.md +++ b/docs/oauth.md @@ -90,6 +90,8 @@ the refresh token process will need to be followed. (for section 5.2, the expires_in value will always be sent and end-user facing clients MUST be able to interpret it and follow the refresh process) +![A sequence diagram showing the HTTP requests when a user signs in from Whitehall Publisher](diagrams/signon-sign-in-from-whitehall-publisher.svg). + ### API requests For API requests, we use the Implicit grant type: