-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retrieved an access token from GitHub OAuth
- Loading branch information
0 parents
commit 21ed3e9
Showing
23 changed files
with
652 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
*~ | ||
configure | ||
Makefile.in | ||
Makefile | ||
src/ur/config.urp | ||
src/m4/libtool.m4 | ||
src/m4/ltoptions.m4 | ||
src/m4/ltsugar.m4 | ||
src/m4/ltversion.m4 | ||
src/m4/lt~obsolete.m4 | ||
missing | ||
*.sub | ||
*.guess | ||
*.log | ||
*.status | ||
libtool | ||
depcomp | ||
install-sh | ||
ltmain.sh | ||
compile | ||
ar-lib | ||
*.m4 | ||
*.cache | ||
src/c/.deps | ||
src/c/.libs | ||
*.lo | ||
*.la | ||
*.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Copyright (c) 2010-2011, 2016, Adam Chlipala | ||
Portions contributed by Robin Green and Karn Kallio in 2011. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
- Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
- Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
- The names of contributors may not be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ACLOCAL_AMFLAGS = -I m4 | ||
|
||
LIB = @LIB@ | ||
INCLUDE = @INCLUDE@ | ||
|
||
LIB_UR = $(LIB)/ur/world | ||
|
||
SUBDIRS = src/c | ||
|
||
install-exec-local: | ||
mkdir -p $(LIB_UR) | ||
cp src/ur/*.urs $(LIB_UR)/ | ||
cp src/ur/*.ur $(LIB_UR)/ | ||
cp src/ur/*.urp $(LIB_UR)/ | ||
mkdir -p $(INCLUDE) | ||
cp include/*.h $(INCLUDE)/ | ||
-ldconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
An Ur/Web library for talking to popular Web services (e.g., for authentication) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
autoreconf -fvi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
AC_INIT([urweb_world], [1.0]) | ||
AC_USE_SYSTEM_EXTENSIONS | ||
AM_INIT_AUTOMAKE([-Wall -Werror foreign no-define]) | ||
AC_PROG_CC() | ||
AM_PROG_AR() | ||
AC_PROG_LIBTOOL() | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
|
||
LIBCURL_CHECK_CONFIG(yes, [], [echo >/dev/null], [echo "You must install libcurl development files."; exit 1]) | ||
|
||
if test [$prefix = "NONE"]; then | ||
prefix=/usr/local | ||
fi | ||
|
||
if test [-z $LIB]; then | ||
LIB=$prefix/lib/urweb | ||
fi | ||
|
||
if test [-z $INCLUDE]; then | ||
INCLUDE=$prefix/include/urweb | ||
fi | ||
|
||
AC_SUBST(LIB) | ||
AC_SUBST(INCLUDE) | ||
|
||
AC_CONFIG_FILES([ | ||
Makefile | ||
src/c/Makefile | ||
src/ur/config.urp | ||
]) | ||
|
||
AC_OUTPUT() | ||
|
||
cat <<EOF | ||
|
||
Ur/Web World library configuration: | ||
lib directory: LIB $LIB | ||
include directory: INCLUDE $INCLUDE | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
basic_in.ur | ||
*.exe | ||
*.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
To run `Basic` example: copy `basic_in.urp.in` to `basic_in.urp` and fill in your GitHub application details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
structure O = Oauth.Make(struct | ||
open Basic_in | ||
|
||
val authorize_url = bless "https://github.com/login/oauth/authorize" | ||
val access_token_url = bless "https://github.com/login/oauth/access_token" | ||
end) | ||
|
||
val after = | ||
return <xml>Welcome back.</xml> | ||
|
||
fun main () = | ||
O.authorize {ReturnTo = url after} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
rewrite all Basic/* | ||
library ../src/ur | ||
safeGet main | ||
allow url https://github.com/* | ||
database dbname=basic | ||
sql basic.sql | ||
prefix http://localhost:8080/ | ||
|
||
basic_in | ||
basic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
val main : unit -> transaction page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
val client_id = "id" | ||
val client_secret = "secret" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include <urweb.h> | ||
|
||
uw_Basis_string uw_WorldFfi_post(uw_context ctx, uw_Basis_string url, uw_Basis_string body); |
Oops, something went wrong.