Skip to content

Commit

Permalink
Merge pull request #21 from rogpeppe/024-deprecate-old-macaroon-path
Browse files Browse the repository at this point in the history
deprecate macaroon package; update bakery to use new macaroon package path
  • Loading branch information
rogpeppe committed Oct 23, 2014
2 parents 155185a + 6790a40 commit dd2e716
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 17 deletions.
3 changes: 1 addition & 2 deletions bakery/discharge.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import (
"fmt"

"github.com/juju/errgo"

"github.com/rogpeppe/macaroon"
"gopkg.in/macaroon.v1"
)

// NewMacaroon mints a new macaroon with the given id and caveats.
Expand Down
2 changes: 1 addition & 1 deletion bakery/discharge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"

gc "gopkg.in/check.v1"
"gopkg.in/macaroon.v1"

"github.com/rogpeppe/macaroon"
"github.com/rogpeppe/macaroon/bakery"
)

Expand Down
3 changes: 2 additions & 1 deletion bakery/example/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"net/url"

"github.com/juju/errgo"

Expand All @@ -24,7 +25,7 @@ func clientRequest(serverEndpoint string) (string, error) {
// when required, and retrying the request
// when necessary.

visitWebPage := func(url string) error {
visitWebPage := func(url *url.URL) error {
fmt.Printf("please visit this web page:\n")
fmt.Printf("\t%s\n", url)
return nil
Expand Down
2 changes: 1 addition & 1 deletion bakery/example/idservice/idservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/juju/errgo"
"github.com/juju/utils/jsonhttp"
"gopkg.in/macaroon.v1"

"github.com/rogpeppe/macaroon"
"github.com/rogpeppe/macaroon/bakery"
"github.com/rogpeppe/macaroon/bakery/checkers"
"github.com/rogpeppe/macaroon/bakery/example/meeting"
Expand Down
2 changes: 1 addition & 1 deletion bakery/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"log"
"sync"

"github.com/rogpeppe/macaroon"
"gopkg.in/macaroon.v1"
)

const debug = false
Expand Down
2 changes: 1 addition & 1 deletion httpbakery/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (

"code.google.com/p/go.net/publicsuffix"
"github.com/juju/errgo"
"gopkg.in/macaroon.v1"

"github.com/rogpeppe/macaroon"
"github.com/rogpeppe/macaroon/bakery"
)

Expand Down
2 changes: 1 addition & 1 deletion httpbakery/discharge.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"path"

"github.com/juju/errgo"
"gopkg.in/macaroon.v1"

"github.com/rogpeppe/macaroon"
"github.com/rogpeppe/macaroon/bakery"
)

Expand Down
3 changes: 1 addition & 2 deletions httpbakery/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import (

"github.com/juju/errgo"
"github.com/juju/utils/jsonhttp"

"github.com/rogpeppe/macaroon"
"gopkg.in/macaroon.v1"
)

// ErrorCode holds an error code that classifies
Expand Down
2 changes: 1 addition & 1 deletion httpbakery/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"net/http"

"github.com/rogpeppe/macaroon"
"gopkg.in/macaroon.v1"
)

type dischargeRequestedResponse struct {
Expand Down
4 changes: 2 additions & 2 deletions httpbakery/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"strings"

"code.google.com/p/go.net/publicsuffix"
"gopkg.in/macaroon.v1"

"github.com/rogpeppe/macaroon"
"github.com/rogpeppe/macaroon/bakery"
)

Expand Down Expand Up @@ -68,7 +68,7 @@ type cookieLogger struct {
}

func (j *cookieLogger) SetCookies(u *url.URL, cookies []*http.Cookie) {
log.Printf("%p setting %d cookies for %s", j.CookieJar, len(cookies), u)
log.Printf("%p setting %d cookies for %s", j.CookieJar, len(cookies), u)
for i, c := range cookies {
log.Printf("\t%d. path %s; name %s", i, c.Path, c.Name)
}
Expand Down
8 changes: 4 additions & 4 deletions macaroon.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// The macaroon package implements macaroons as described in
// the paper "Macaroons: Cookies with Contextual Caveats for
// Decentralized Authorization in the Cloud"
// (http://theory.stanford.edu/~ataly/Papers/macaroons.pdf)
// WARNING
//
// The macaroon package is deprecated at this import path.
// Please use gopkg.in/macaroon.v1 instead.
package macaroon

import (
Expand Down

0 comments on commit dd2e716

Please sign in to comment.