Skip to content

Instantly share code, notes, and snippets.

@danpolites
danpolites / BCryptSearchModeSearchDatabaseAuthenticationHandler.java
Created October 26, 2012 12:42
A BCrypt authentication handler for Jasig's CAS
import org.jasig.cas.authentication.principal.UsernamePasswordCredentials;
import org.springframework.security.crypto.bcrypt.BCrypt;
import org.springframework.beans.factory.InitializingBean;
import org.jasig.cas.adaptors.jdbc.AbstractJdbcUsernamePasswordAuthenticationHandler;
/**
* Class that given a table, username field and password field will query a
* database table to see if the user exists. If the user exists, the
* encrypted password, from the datbase, will be compared to the plain
* text password, from the credentials, by using the BCrypt tools.
@danpolites
danpolites / selector-names.html
Created July 10, 2012 00:39
Naming jQuery Selectors
<div class="fancy-style">
<h1>Sample Code</h1>
<p class="message-container-s green-borders bold">This is a test</p>
</div>