Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save daehwann/b6c87c41b5eed1e1881903497278e99a to your computer and use it in GitHub Desktop.

Select an option

Save daehwann/b6c87c41b5eed1e1881903497278e99a to your computer and use it in GitHub Desktop.
Authenticating with Apache Sling
<form method="post" action="/j_security_check">
<p>
You're not logged in. Wouldn't you like to do so?
</p>
<p>
<label for="j_username">Username</label><br />
<input id="j_username" name="j_username" type="text" />
</p>
<p>
<label for="j_password">Password</label><br />
<input id="j_password" name="j_password" type="password" />
</p>
<p>
<input type="submit" value="Log In" />
<input type="hidden" name="_charset_" value="UTF-8" />
<!-- This specifies where the user gets forwarded once authentication is complete. -->
<input type="hidden" name="resource" value="${resource.path}.html" />
<input type="hidden" name="selectedAuthType" value="form" />
</p>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment