Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure the OAuth token is "bearer"

  • Loading branch information...
commit dc17549e4ed9bdd3ba32f0d501a8981a9572bf8c 1 parent d37f0e0
@matta authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 get.go
View
7 get.go
@@ -128,6 +128,13 @@ func tokenPost(authCode string) (resp tokenResponse, err os.Error) {
return
}
+ if strings.ToLower(resp.Token_type) != "bearer" {
+ msg := fmt.Sprintf("Unsupported token type %q, need 'bearer'",
+ resp.Token_type)
+ err = os.NewError(msg)
+ return
+ }
+
return
}
Please sign in to comment.
Something went wrong with that request. Please try again.