@@ -183,6 +183,14 @@ func (s *Store) ClientExists(ctx context.Context, id string) bool {
|
||||
return n == 1
|
||||
}
|
||||
|
||||
func (s *Store) ClientCreatedAt(ctx context.Context, id string) (time.Time, error) {
|
||||
var ms int64
|
||||
if err := s.DB.QueryRowContext(ctx, `SELECT created_at FROM clients WHERE id=?`, id).Scan(&ms); err != nil {
|
||||
return time.Time{}, err
|
||||
}
|
||||
return time.UnixMilli(ms).UTC(), nil
|
||||
}
|
||||
|
||||
func (s *Store) ClientPublicJWK(ctx context.Context, id string) (auth.PublicJWK, error) {
|
||||
var raw string
|
||||
if err := s.DB.QueryRowContext(ctx, `SELECT public_jwk FROM clients WHERE id=?`, id).Scan(&raw); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user