-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup of imports, addition of logger interface, ability to change h…
…ttp.Client (#5) * cleanup of imports, addition of logger interface, ability to change http.Client * change way of working with default logging
- Loading branch information
Showing
8 changed files
with
46 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,10 +25,11 @@ go get github.com/s12v/[email protected] | |
package main | ||
|
||
import ( | ||
"log" | ||
"time" | ||
|
||
"github.com/s12v/go-jwks" | ||
"github.com/square/go-jose" | ||
"time" | ||
"log" | ||
) | ||
|
||
func main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package jwks | ||
|
||
import ( | ||
"log" | ||
) | ||
|
||
type jwksLogger interface { | ||
Printf(format string, v ...interface{}) | ||
} | ||
|
||
// This is necessary to work around go1.12 requirement | ||
type defaultLogger struct{} | ||
|
||
func (defaultLogger) Printf(format string, v ...interface{}) { | ||
log.Printf(format, v...) | ||
} | ||
|
||
var logger jwksLogger = defaultLogger{} | ||
|
||
func SetLogger(l jwksLogger) { | ||
logger = l | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters