Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra arguments #27

Merged
merged 2 commits into from
Dec 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cli/hydra-host/handler/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ import (
"crypto/x509/pkix"
"encoding/pem"
"fmt"
"github.com/codegangsta/cli"
"math/big"
"net"
"os"
"strings"
"time"

"github.com/codegangsta/cli"
)

func publicKey(priv interface{}) interface{} {
Expand Down Expand Up @@ -149,7 +150,7 @@ func CreateDummyTLSCert(ctx *cli.Context) error {

keyOut, err := os.OpenFile(ctx.String("key-file-path"), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
return fmt.Errorf("failed to open key.pem for writing:", err)
return fmt.Errorf("failed to open key.pem for writing: %v", err)
}
pem.Encode(keyOut, pemBlockForKey(priv))
keyOut.Close()
Expand Down
5 changes: 3 additions & 2 deletions oauth/provider/signin/signin.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package signin
import (
"encoding/json"
"fmt"
"net/http"

"github.com/go-errors/errors"
. "github.com/ory-am/hydra/oauth/provider"
"github.com/parnurzeal/gorequest"
"golang.org/x/oauth2"
"net/http"
)

type signin struct {
Expand Down Expand Up @@ -46,7 +47,7 @@ func (d *signin) Exchange(code string) (Session, error) {

var p payload
if err := json.Unmarshal([]byte(body), &p); err != nil {
return nil, errors.Errorf("Could not parse answer: %d", err)
return nil, errors.Errorf("Could not parse answer: %v", err)
}

if p.Subject == "" {
Expand Down