packages feed

hoauth2-demo-1.6.0: public/templates/index.mustache

<html>
    <head>
        <link href="/main.css" rel="stylesheet"/>
    </head>
    <body>
        <h1>HOAuth2 Demo Server</h1>

        <h2>Authorization Code flow</h2>
        {{#idps}}
        <section class="login-with">
            {{^isLogin}}
            <a href="{{codeFlowUri}}">Sign in with {{name}}</a>
            {{/isLogin}}
            {{#isLogin}}
            <h2>Welcome to {{name}}</h2>
            {{#user}}
            <div class="result">Hello, {{name}}</div>
            {{/user}}
            <a href="/logout?idp={{name}}">Logout</a>
            <a href="/refresh?idp={{name}}">Refresh</a>
            {{/isLogin}}
        </section>
        {{/idps}}

        <h2>Password flow</h2>
        <section class="login-with">
            <a href="/login/password-grant?i=auth0">Test Password Grant Type flow-auth0</a>
        </section>
        <section class="login-with">
            <a href="/login/password-grant?i=okta">Test Password Grant Type flow-okta</a>
        </section>

        <ul>
            <li>Check console for login success</li>
        </ul>

        <h2>Client Credentials flow</h2>
        <section class="login-with">
            <a href="/login/cc-grant?i=auth0">Test Client Credentials Grant Type flow (auth0)</a>
        </section>
        <section class="login-with">
            <a href="/login/cc-grant?i=okta">Test Client Credentials Grant Type flow (okta)</a>
        </section>
        <ul>
            <li>Check console for login success</li>
        </ul>

        <h2>JWT Bearer flow</h2>
        <section class="login-with">
            <a href="/login/jwt-grant">Test Google service account</a>
        </section>
        <ul>
            <li>Check console for login success</li>
        </ul>

        <h2>Notes</h2>
        <ol>
            <li>for StackExchange, the callback domain is localhost, have manually add port 9988.</li>
            <li>for Slack, the callback url has to be https and without any port hence need manual intervention. (TODO: add tls to the server)</li>
        </ol>
        </p>
    </body>
</html>