Little modifications & updates

Signed-off-by: Luca Fulchir <luca@fulchir.it>
parent edb3ce8f
Questa è un implementazione leggera e generica dei protocolli d'autenticazione
OAuth1 e OAuth2 nel linguaggio Jolie.
==================
Install
==================
cd src
make
make install
==================
Demo
==================
cd src/
make demo1server &
make demo1
puntare il proprio browser sulla pagina indicata
effettuare il login
esiste una demo analoga per OAuth2
cd src/
make demo1server &
make demo1
Essendo una libreria generica, ed essendo OAuth troppo flessibile,
la maggior parte della gestione del protocollo è lasciata all'utente finale.
Per semplicità le demo lavorano con username e password statiche, per non
richiedere collegamenti a database esterni.
Data la brevità delle demo, si rimanda al codice per la documentazione
sull'utilizzo
OAuth1 implementation:
-All
OAuth2 implementation:
-All
No preview for this file type
......@@ -2,7 +2,8 @@ JAVAC=javac
CWD=${PWD}
BUILDDIR=${CWD}/../build/
JARDIR=${CWD}/../lib
JOLIEDIR=/opt/jolie/
#from environment
#JOLIE_HOME=/usr/lib/jolie/
PACKAGE_NAME="utils.jar"
LIBRARY="httpcore-4.2.2.jar httpclient-4.2.3.jar commons-io-2.4.jar"
SRC=${CWD}/jolie/net/
......@@ -11,11 +12,11 @@ all: ${BUILDDIR}/jolie/net/utils/Hmac.class ${BUILDDIR}/jolie/net/utils/HTTP.cla
${BUILDDIR}/jolie/net/utils/Hmac.class: ${SRC}/utils/Hmac.java
- mkdir -p ${BUILDDIR} 2>/dev/null
${JAVAC} -cp ${JOLIEDIR}/jolie.jar:${JARDIR}/commons-codec-1.6.jar -d ${BUILDDIR} jolie/net/utils/Hmac.java
${JAVAC} -cp ${JOLIE_HOME}/jolie.jar:${JARDIR}/commons-codec-1.6.jar -d ${BUILDDIR} jolie/net/utils/Hmac.java
${BUILDDIR}/jolie/net/utils/HTTP.class: ${SRC}/utils/HTTP.java
- mkdir -p ${BUILDDIR} 2>/dev/null
${JAVAC} -cp ${JOLIEDIR}/jolie.jar:${JARDIR}/httpcore-4.2.2.jar:${JARDIR}/httpclient-4.2.3.jar:${JARDIR}/commons-io-2.4.jar:${JARDIR}/commons-codec-1.6.jar:${JOLIEDIR}/extensions/http.jar:${JOLIEDIR}/lib/json_simple.jar -d ${BUILDDIR} jolie/net/utils/HTTP.java
${JAVAC} -cp ${JOLIE_HOME}/jolie.jar:${JARDIR}/httpcore-4.2.2.jar:${JARDIR}/httpclient-4.2.3.jar:${JARDIR}/commons-io-2.4.jar:${JARDIR}/commons-codec-1.6.jar:${JOLIE_HOME}/extensions/http.jar:${JOLIE_HOME}/lib/json_simple.jar -d ${BUILDDIR} jolie/net/utils/HTTP.java
clean:
......@@ -23,24 +24,24 @@ clean:
install: ${BUILDDIR}/jolie/net/utils/Hmac.class ${BUILDDIR}/jolie/net/utils/HTTP.class
cd ${BUILDDIR} && jar cvf ${PACKAGE_NAME} ./jolie/net/utils/*class && cd ${CWD}
cp ${BUILDDIR}/utils.jar ${JOLIEDIR}/javaServices/
cp ${JARDIR}/*.jar ${JOLIEDIR}/javaServices/
cp ${BUILDDIR}/utils.jar ${JOLIE_HOME}/javaServices/
cp ${JARDIR}/*.jar ${JOLIE_HOME}/javaServices/
uninstall:
-rm ${JOLIEDIR}/javaServices/utils.jar
-rm ${JOLIEDIR}/javaServices/commons-codec-1.6.jar
-rm ${JOLIEDIR}/javaServices/commons-logging-1.1.1.jar
-rm ${JOLIEDIR}/javaServices/httpcore-4.2.2.jar
-rm ${JOLIEDIR}/javaServices/commons-io-2.4.jar
-rm ${JOLIEDIR}/javaServices/httpclient-4.2.3.jar
-rm ${JOLIEDIR}/javaServices/json_simple.jar
demo1: ${JOLIEDIR}/javaServices/utils.jar
-rm ${JOLIE_HOME}/javaServices/utils.jar
-rm ${JOLIE_HOME}/javaServices/commons-codec-1.6.jar
-rm ${JOLIE_HOME}/javaServices/commons-logging-1.1.1.jar
-rm ${JOLIE_HOME}/javaServices/httpcore-4.2.2.jar
-rm ${JOLIE_HOME}/javaServices/commons-io-2.4.jar
-rm ${JOLIE_HOME}/javaServices/httpclient-4.2.3.jar
-rm ${JOLIE_HOME}/javaServices/json_simple.jar
demo1: ${JOLIE_HOME}/javaServices/utils.jar
jolie jolie/net/OAuth/demo1.ol
demo1server: ${JOLIEDIR}/javaServices/utils.jar
demo1server: ${JOLIE_HOME}/javaServices/utils.jar
jolie jolie/net/OAuth/demo1server.ol
demo2: ${JOLIEDIR}/javaServices/utils.jar
demo2: ${JOLIE_HOME}/javaServices/utils.jar
jolie jolie/net/OAuth/demo2.ol
demo2server: ${JOLIEDIR}/javaServices/utils.jar
demo2server: ${JOLIE_HOME}/javaServices/utils.jar
jolie jolie/net/OAuth/demo2server.ol
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment