Skip to content

Commit

Permalink
Reorder fields in options for better alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
ferhatelmas committed Oct 19, 2019
1 parent 3608124 commit 2037fbe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jwtmiddleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"errors"
"fmt"
"github.com/dgrijalva/jwt-go"
"log"
"net/http"
"strings"

"github.com/dgrijalva/jwt-go"
)

// A function called whenever an error is encountered
Expand All @@ -33,12 +34,12 @@ type Options struct {
// The function that will be called when there's an error validating the token
// Default value:
ErrorHandler errorHandler
// A boolean indicating if the credentials are required or not
// Default value: false
CredentialsOptional bool
// A function that extracts the token from the request
// Default: FromAuthHeader (i.e., from Authorization header as bearer token)
Extractor TokenExtractor
// A boolean indicating if the credentials are required or not
// Default value: false
CredentialsOptional bool
// Debug flag turns on debugging output
// Default: false
Debug bool
Expand Down

0 comments on commit 2037fbe

Please sign in to comment.