~vds/usso/fix_and_point_and_check_for_201_too

« back to all changes in this revision

Viewing changes to oauth_test.go

  • Committer: vincenzo di somma
  • Date: 2013-02-05 12:37:03 UTC
  • Revision ID: vincenzo.di.somma@canonical.com-20130205123703-nq0k8esvzw8woq2q
Fixing/adding comments and cleaning up.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
        suite.request, _ = http.NewRequest("GET", baseUrl, nil)
25
25
}
26
26
 
27
 
// Test the request signing with oauth_signature_method = PLAINTEXT
 
27
// It is possible to sign a request with oauth_signature_method = PLAINTEXT
28
28
func (suite *OAuthTestSuite) TestSignRequestPlainText(c *C) {
29
 
        // FIXME use rp SignatureMethod
30
29
        suite.rp.SignatureMethod = PLAINTEXT{}
31
30
        err := suite.ssodata.SignRequest(&suite.rp, suite.request)
32
31
        if err != nil {
47
46
                        suite.ssodata.TokenSecret)+`.*`)
48
47
}
49
48
 
50
 
// Test the request signing with oauth_signature_method = SHA1
 
49
// It is possible to sign a request  with oauth_signature_method = SHA1
51
50
func (suite *OAuthTestSuite) TestSignRequestSHA1(c *C) {
52
 
        // FIXME use rp SignatureMethod
53
51
        suite.rp.SignatureMethod = HMACSHA1{}
54
52
        err := suite.ssodata.SignRequest(&suite.rp, suite.request)
55
53
        if err != nil {