Skip to content

Instantly share code, notes, and snippets.

View gabrielrubens's full-sized avatar

Gabriel Rubens gabrielrubens

View GitHub Profile
@gabrielrubens
gabrielrubens / HttpDigestAuthServlet.java
Created September 26, 2015 05:05 — forked from usamadar/HttpDigestAuthServlet.java
HTTP Servlet Sample Implmentation of HTTP Digest Authentication RFC 2617
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.example.http.authenticate;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
#!/bin/sh
clear
f_o6 () {
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64;
sudo update-alternatives --set java /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java;
}
f_s6 () {
package org.scribe.builder.api;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.scribe.exceptions.OAuthException;
import org.scribe.extractors.AccessTokenExtractor;
import org.scribe.model.OAuthConfig;
import org.scribe.model.OAuthConstants;
import org.scribe.model.OAuthRequest;