Skip to content

Instantly share code, notes, and snippets.

# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
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.