provider/views.aug
OpenID Connect login application · Source and specification
Files in this project
main.augclient/contracts.augclient/endpoints.augclient/export.augclient/login.augclient/logout.augclient/protocol.augclient/session.augclient/views.augcommon/export.augcommon/headers.augcommon/keys.augcommon/settings.augcommon/views.augprovider/authorization.augprovider/contracts.augprovider/credentials.augprovider/discovery.augprovider/export.augprovider/token.augprovider/userinfo.augprovider/views.aug
Code
// aug-spec: "views.aug.md" explains this file. Read it before changes; refresh with aug spec.
import Page from common
/** A server form with a checked HTTP action. The browser submits to the provider endpoint. */
ProviderLogin(string requestId, string csrf, string message, HttpAction submit):
return <Page title={"Sign in with the August provider"}><p>{message}</p><p style={"background:#f3f5f9;padding:12px;border-radius:8px"}>Demo account: <strong>ada</strong> · password <strong>august-demo</strong></p><form method={"post"} action={"/provider/login"} onSubmit={submit}><input type={"hidden"} name={"request_id"} value={requestId} /><input type={"hidden"} name={"csrf"} value={csrf} /><p><label for={"username"}>Username</label><br /><input id={"username"} name={"username"} autocomplete={"username"} value={"ada"} maxlength={"64"} required={true} style={"padding:10px;width:90%"} /></p><p><label for={"password"}>Password</label><br /><input id={"password"} type={"password"} name={"password"} autocomplete={"current-password"} maxlength={"256"} required={true} style={"padding:10px;width:90%"} /></p><button type={"submit"} style={"padding:12px 20px;border:0;border-radius:9px;background:#4852d7;color:white;font:inherit"}>Sign in and return to the app</button></form><p style={"font-size:14px;color:#677189"}>The provider and app run in the same executable. Authorization codes still travel through the OpenID Connect protocol.</p></Page>
ProviderFailure(string message):
return <Page title={"Sign-in could not continue"}><p>{message}</p><a href={"/login/start"}>Start a new sign-in</a></Page>// aug-spec: "views.aug.md" explains this file. Read it before changes; refresh with aug spec.
import Page from common
/** A server form with a checked HTTP action. The browser submits to the provider endpoint. */
ProviderLogin(string requestId, string csrf, string message, HttpAction submit) {
return <Page title={"Sign in with the August provider"}><p>{message}</p><p style={"background:#f3f5f9;padding:12px;border-radius:8px"}>Demo account: <strong>ada</strong> · password <strong>august-demo</strong></p><form method={"post"} action={"/provider/login"} onSubmit={submit}><input type={"hidden"} name={"request_id"} value={requestId} /><input type={"hidden"} name={"csrf"} value={csrf} /><p><label for={"username"}>Username</label><br /><input id={"username"} name={"username"} autocomplete={"username"} value={"ada"} maxlength={"64"} required={true} style={"padding:10px;width:90%"} /></p><p><label for={"password"}>Password</label><br /><input id={"password"} type={"password"} name={"password"} autocomplete={"current-password"} maxlength={"256"} required={true} style={"padding:10px;width:90%"} /></p><button type={"submit"} style={"padding:12px 20px;border:0;border-radius:9px;background:#4852d7;color:white;font:inherit"}>Sign in and return to the app</button></form><p style={"font-size:14px;color:#677189"}>The provider and app run in the same executable. Authorization codes still travel through the OpenID Connect protocol.</p></Page>
}
ProviderFailure(string message) {
return <Page title={"Sign-in could not continue"}><p>{message}</p><a href={"/login/start"}>Start a new sign-in</a></Page>
}Compiled specification
ProviderLogin · source
A server form with a checked HTTP action. The browser submits to the provider endpoint. It takes requestId, csrf, and message as strings and submit as HttpAction.
It returns the server component Page with title = "Sign in with the August provider" containing a paragraph containing message with escaped text, a paragraph with style = "background:#f3f5f9;padding:12px;border-radius:8px" containing Demo account: , the HTML element strong containing ada with escaped text, · password, the HTML element strong containing august-demo with escaped text with escaped text, the HTML element form with method = "post", action = "/provider/login", onSubmit = submit containing the HTML element input with type = "hidden", name = "request_id", value = requestId with escaped text, the HTML element input with type = "hidden", name = "csrf", value = csrf with escaped text, a paragraph containing the HTML element label with for = "username" containing Username with escaped text, the HTML element br with escaped text, the HTML element input with id = "username", name = "username", autocomplete = "username", value = "ada", maxlength = "64", required = true, style = "padding:10px;width:90%" with escaped text with escaped text, a paragraph containing the HTML element label with for = "password" containing Password with escaped text, the HTML element br with escaped text, the HTML element input with id = "password", type = "password", name = "password", autocomplete = "current-password", maxlength = "256", required = true, style = "padding:10px;width:90%" with escaped text with escaped text, a button with type = "submit", style = "padding:12px 20px;border:0;border-radius:9px;background:#4852d7;color:white;font:inherit" containing Sign in and return to the app with escaped text with escaped text, a paragraph with style = "font-size:14px;color:#677189" containing The provider and app run in the same executable. Authorization codes still travel through the OpenID Connect protocol. with escaped text with escaped text. source
Checked interface
ProviderLogin(string requestId, string csrf, string message, HttpAction submit) returns HtmlIt takes requestId, csrf, and message as strings and submit as HttpAction.
ProviderFailure · source
It takes message as a string. It returns the server component Page with title = "Sign-in could not continue" containing a paragraph containing message with escaped text, a link with href = "/login/start" containing Start a new sign-in with escaped text with escaped text. source
Checked interface
ProviderFailure(string message) returns HtmlIt takes message as a string.
Dependencies
It uses Page from common.