Skip to content

Commit

Permalink
made the code more go getable
Browse files Browse the repository at this point in the history
  • Loading branch information
girishramnani committed May 22, 2018
1 parent c6f4179 commit 23e4a3c
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 22 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ In order to successfully run this sample app you need a few things:

## First Use Instructions

1. Clone the GitHub repo to your computer and place it in the src directory of your $GOPATH
2. Fill in the [`config.json`](oauth2sample/config.json) file values (clientId, clientSecret) by copying over from the keys section for your app.
1. `go get -d github.com/IntuitDeveloper/OAuth2-Go`
2. Fill in the [`config.json`](github.com/IntuitDeveloper/OAuth2-Go/config.json) file values (clientId, clientSecret) by copying over from the keys section for your app.

## Running the code

Once the sample app code is on your computer, you can do the following steps to run the app:

1. Install the sample using the following commands<br />
`cd $GOPATH/src/oauth2sample`<br />
`cd $GOPATH/src/github.com/IntuitDeveloper/OAuth2-Go`<br />
`go install`<br />
2. Run the sample by using one of the two commands below<br />
`$GOPATH/bin/oauth2sample`<br />
`$GOPATH/bin/OAuth2-Go`<br />
or <br />
`oauth2sample`<br />
`OAuth2-Go`<br />
3. Wait until the terminal output displays the "running server on :9090" message.
4. Your app should be up now in http://localhost:9090/
5. The oauth2 callback endpoint in the sample app is http://localhost:9090/oauth2redirect
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"net/http"
"net/url"

"oauth2sample/cache"
"oauth2sample/config"
"github.com/IntuitDeveloper/OAuth2-Go/cache"
"github.com/IntuitDeveloper/OAuth2-Go/config"
)

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"
"net/http"

"oauth2sample/cache"
"github.com/IntuitDeveloper/OAuth2-Go/cache"
)

/*
Expand Down
4 changes: 2 additions & 2 deletions oauth2sample/handlers/discovery.go → handlers/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"log"
"net/http"

"oauth2sample/cache"
"oauth2sample/config"
"github.com/IntuitDeveloper/OAuth2-Go/cache"
"github.com/IntuitDeveloper/OAuth2-Go/config"
)

/*
Expand Down
2 changes: 1 addition & 1 deletion oauth2sample/handlers/jwks.go → handlers/jwks.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"net/http"

"oauth2sample/cache"
"github.com/IntuitDeveloper/OAuth2-Go/cache"
)

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/twinj/uuid"

"oauth2sample/cache"
"oauth2sample/config"
"github.com/IntuitDeveloper/OAuth2-Go/cache"
"github.com/IntuitDeveloper/OAuth2-Go/config"
)

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"log"
"net/http"

"oauth2sample/cache"
"oauth2sample/config"
"github.com/IntuitDeveloper/OAuth2-Go/cache"
"github.com/IntuitDeveloper/OAuth2-Go/config"
)

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"net/url"

"oauth2sample/cache"
"github.com/IntuitDeveloper/OAuth2-Go/cache"
)

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"net/url"

"oauth2sample/cache"
"github.com/IntuitDeveloper/OAuth2-Go/cache"
)

/*
Expand Down
2 changes: 1 addition & 1 deletion oauth2sample/handlers/userInfo.go → handlers/userInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"net/http"

"oauth2sample/cache"
"github.com/IntuitDeveloper/OAuth2-Go/cache"
)

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"math/big"
"time"

"oauth2sample/cache"
"oauth2sample/config"
"github.com/IntuitDeveloper/OAuth2-Go/cache"
"github.com/IntuitDeveloper/OAuth2-Go/config"

"strings"
)
Expand Down
5 changes: 3 additions & 2 deletions oauth2sample/main.go → main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package main
import (
"log"
"net/http"
"oauth2sample/config"
"oauth2sample/handlers"

"github.com/IntuitDeveloper/OAuth2-Go/config"
"github.com/IntuitDeveloper/OAuth2-Go/handlers"
)

func main() {
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 23e4a3c

Please sign in to comment.