Skip to content
Snippets Groups Projects
Commit 7a0671f0 authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

Merge branch 'master' into dev

parents 31bb6b3d 28e13380
No related branches found
No related tags found
No related merge requests found
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
open-pull-requests-limit: 15
......@@ -3,27 +3,28 @@ module github.com/oidc-mytoken/server
go 1.16
require (
github.com/Songmu/prompter v0.4.0
github.com/Songmu/prompter v0.5.0
github.com/coreos/go-oidc/v3 v3.0.0
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fatih/structs v1.1.0
github.com/go-resty/resty/v2 v2.4.0
github.com/go-sql-driver/mysql v1.5.0
github.com/gofiber/fiber/v2 v2.7.1
github.com/gofiber/helmet/v2 v2.1.0
github.com/gofiber/template v1.6.8
github.com/go-resty/resty/v2 v2.6.0
github.com/go-sql-driver/mysql v1.6.0
github.com/goccy/go-json v0.6.1 // indirect
github.com/gofiber/fiber/v2 v2.12.0
github.com/gofiber/helmet/v2 v2.1.5
github.com/gofiber/template v1.6.11
github.com/ip2location/ip2location-go v8.3.0+incompatible
github.com/jessevdk/go-flags v1.4.0
github.com/jinzhu/copier v0.1.0
github.com/jmoiron/sqlx v1.3.1
github.com/lestrrat-go/jwx v1.0.8
github.com/jessevdk/go-flags v1.5.0
github.com/jinzhu/copier v0.3.2
github.com/jmoiron/sqlx v1.3.4
github.com/lestrrat-go/jwx v1.2.1
github.com/oidc-mytoken/api v0.0.0-20210610140005-29f166a942ec
github.com/oidc-mytoken/lib v0.2.1-0.20210611134913-0c477174fc1f
github.com/satori/go.uuid v1.2.0
github.com/sirupsen/logrus v1.7.0
github.com/valyala/fasthttp v1.22.0
github.com/sirupsen/logrus v1.8.1
github.com/valyala/fasthttp v1.26.0
github.com/zachmann/cli/v2 v2.3.1-0.20210512144416-96dd678d93c7
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
golang.org/x/mod v0.4.2
golang.org/x/oauth2 v0.0.0-20210125201302-af13f521f196
golang.org/x/term v0.0.0-20210503060354-a79de5458b56
......
This diff is collapsed.
......@@ -64,7 +64,7 @@ func (c *Cluster) AddNodes() {
func (c *Cluster) AddNode(host string) error {
log.WithField("host", host).Debug("Adding node to db cluster")
dsn := fmt.Sprintf("%s:%s@%s(%s)/%s", c.conf.User, c.conf.GetPassword(), "tcp", host, c.conf.DB)
dsn := fmt.Sprintf("%s:%s@%s(%s)/%s?parseTime=true", c.conf.User, c.conf.GetPassword(), "tcp", host, c.conf.DB)
return c.addNode(&node{
dsn: dsn,
})
......
......@@ -11,7 +11,7 @@ import (
"io/ioutil"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/dgrijalva/jwt-go"
jwt "github.com/dgrijalva/jwt-go"
"github.com/lestrrat-go/jwx/jwk"
"github.com/oidc-mytoken/server/internal/config"
......@@ -85,7 +85,7 @@ func exportRSAPrivateKeyAsPemStr(privkey *rsa.PrivateKey) string {
var privateKey interface{}
var publicKey interface{}
var jwks jwk.Set
var jwks = jwk.NewSet()
// GetPrivateKey returns the private key
func GetPrivateKey() interface{} {
......@@ -136,5 +136,5 @@ func LoadKey() {
if err = key.Set(jwk.KeyUsageKey, string(jwk.ForSignature)); err != nil {
panic(err)
}
jwks = jwk.Set{Keys: []jwk.Key{key}}
jwks.Add(key)
}
package unixtime
import (
"database/sql"
"database/sql/driver"
"time"
"github.com/go-sql-driver/mysql"
"github.com/oidc-mytoken/server/shared/utils"
)
......@@ -28,7 +27,7 @@ func InSeconds(s int64) UnixTime {
// Value implements the driver.Valuer interface
func (t UnixTime) Value() (driver.Value, error) {
return mysql.NullTime{
return sql.NullTime{
Time: t.Time(),
Valid: true,
}.Value()
......@@ -36,7 +35,7 @@ func (t UnixTime) Value() (driver.Value, error) {
// Scan implements the sql.Scanner interface
func (t *UnixTime) Scan(src interface{}) error {
var tmp mysql.NullTime
var tmp sql.NullTime
if err := tmp.Scan(src); err != nil {
return err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment