Skip to content

Commit

Permalink
docs: Resolves minor spelling mistakes (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
antham authored and arekkas committed Feb 11, 2018
1 parent d05fadf commit 7fbd246
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion handler/oauth2/flow_authorize_implicit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestAuthorizeImplicit_EndpointHandler(t *testing.T) {
expectErr: fosite.ErrServerError,
},
{
description: "should fail because persistance failed",
description: "should fail because persistence failed",
setup: func() {
chgen.EXPECT().GenerateAccessToken(nil, areq).AnyTimes().Return("access.ats", "ats", nil)
store.EXPECT().CreateAccessTokenSession(nil, "ats", areq).Return(errors.New(""))
Expand Down
2 changes: 1 addition & 1 deletion handler/oauth2/flow_client_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (c *ClientCredentialsGrantHandler) HandleTokenEndpointRequest(_ context.Con
}

// The client MUST authenticate with the authorization server as described in Section 3.2.1.
// This requirement is already fulfilled because fosite requries all token requests to be authenticated as described
// This requirement is already fulfilled because fosite requires all token requests to be authenticated as described
// in https://tools.ietf.org/html/rfc6749#section-3.2.1
if client.IsPublic() {
return errors.WithStack(fosite.ErrInvalidGrant.WithDebug("The client is public and thus not allowed to use grant type client_credentials"))
Expand Down
4 changes: 2 additions & 2 deletions introspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ type TokenIntrospector interface {
}

func AccessTokenFromRequest(req *http.Request) string {
// Acording to https://tools.ietf.org/html/rfc6750 you can pass tokens through:
// - Form-Encoded Body Parameter. Recomended, more likely to appear. e.g.: Authorization: Bearer mytoken123
// According to https://tools.ietf.org/html/rfc6750 you can pass tokens through:
// - Form-Encoded Body Parameter. Recommended, more likely to appear. e.g.: Authorization: Bearer mytoken123
// - URI Query Parameter e.g. access_token=mytoken123

auth := req.Header.Get("Authorization")
Expand Down
2 changes: 1 addition & 1 deletion token/jwt/claims_id_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (c *IDTokenClaims) Get(key string) interface{} {
return c.ToMap()[key]
}

// ToMapClaims will return a jwt-go MapClaims representaion
// ToMapClaims will return a jwt-go MapClaims representation
func (c IDTokenClaims) ToMapClaims() jwt.MapClaims {
return c.ToMap()
}
4 changes: 2 additions & 2 deletions token/jwt/claims_jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ func (c JWTClaims) Get(key string) interface{} {
return c.ToMap()[key]
}

// ToMapClaims will return a jwt-go MapClaims representaion
// ToMapClaims will return a jwt-go MapClaims representation
func (c JWTClaims) ToMapClaims() jwt.MapClaims {
return c.ToMap()
}

// FromMapClaims will populate claims from a jwt-go MapClaims representaion
// FromMapClaims will populate claims from a jwt-go MapClaims representation
func (c *JWTClaims) FromMapClaims(mc jwt.MapClaims) {
c.FromMap(mc)
}

0 comments on commit 7fbd246

Please sign in to comment.