Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3d84fba
Bump golang.org/x/net from 0.27.0 to 0.30.0
dependabot[bot] Oct 7, 2024
6b0385f
[ci] use go 1.24
zachmann Aug 21, 2025
07ac134
add package and publish stages
marcvs Aug 21, 2025
f709e36
Update VERSION
zachmann Aug 21, 2025
beee843
fix indent
marcvs Aug 21, 2025
a8e89b2
Fix shebang
marcvs Aug 21, 2025
5051dc7
use PUBLISH_BUILD_RESULTS_REPO
marcvs Aug 21, 2025
9c7bfd2
[ci] use go 1.24
zachmann Aug 21, 2025
4d54f69
Update VERSION
zachmann Aug 21, 2025
7b09638
use goreleaser
marcvs Aug 21, 2025
4863d08
not needed
marcvs Aug 21, 2025
39b8474
remove upload.sh
marcvs Aug 22, 2025
e77cd01
Merge pull request #63 from oidc-mytoken/add-publish-jobs-2
zachmann Aug 22, 2025
2eba5cd
Merge pull request #62 from oidc-mytoken/dependabot/go_modules/golang…
zachmann Oct 24, 2025
bdc8152
Bump golang.org/x/term from 0.22.0 to 0.25.0
dependabot[bot] Oct 24, 2025
615d785
Merge pull request #61 from oidc-mytoken/dependabot/go_modules/golang…
zachmann Oct 24, 2025
f8414de
Bump golang.org/x/net from 0.30.0 to 0.38.0
dependabot[bot] Oct 24, 2025
f9684f1
Merge pull request #66 from oidc-mytoken/dependabot/go_modules/golang…
zachmann Oct 24, 2025
b72c652
Bump golang.org/x/oauth2
dependabot[bot] Oct 24, 2025
82af0bf
Merge pull request #64 from oidc-mytoken/dependabot/go_modules/golang…
zachmann Oct 24, 2025
f422222
update dependencies
zachmann May 4, 2026
872f8f9
update to urfave/cli v3 and refactor code to align with new API changes
zachmann May 4, 2026
336c6de
add support for specifying a custom mytoken server URL via CLI flag o…
zachmann May 4, 2026
ff3f97b
update copyright years in LICENSE and code files
zachmann May 4, 2026
60e7350
add "config" and "capabilities" commands to CLI for retrieving server…
zachmann May 4, 2026
17edd37
add "email," "tags," "profiles," and "mttags" commands to CLI for man…
zachmann May 6, 2026
0964cea
add support for enabling/disabling colored output via environment var…
zachmann May 6, 2026
a0b39c2
add support for italic and gray text formatting; extend "list-mytoken…
zachmann May 6, 2026
4ecd70d
add "mt list" as an alias for "info list-mytokens"
zachmann May 6, 2026
f98321d
add additional aliases ("rm," "delete") for tag and SSH key managemen…
zachmann May 6, 2026
a25ba60
add "list-all" and "groups" commands for listing profiles, templates,…
zachmann May 6, 2026
ae91f52
normalize color handling: support hex colors with or without "#" prefix
zachmann May 6, 2026
03239f8
add "calendars" and "notifications" commands to CLI for managing cale…
zachmann May 7, 2026
ce9694c
update oidc-mytoken/lib to v0.8.0 and remove local replace directive
zachmann May 7, 2026
b7f666e
Merge branch 'prerel' into new-features
zachmann May 7, 2026
2d0dc6b
update github.com/urfave/cli dependency to v3.8.0
zachmann May 7, 2026
6c15874
bump Go version in CI to 1.25
zachmann May 7, 2026
3ce50ac
update Go version in staticcheck job to 1.25
zachmann May 7, 2026
0f943e3
replace deprecated `strings.Title` with `cases.Title` and update cont…
zachmann May 7, 2026
f6aa970
update `golang.org/x/text` dependency to v0.36.0 and adjust `golang.o…
zachmann May 7, 2026
84e9085
New features
deepsource-autofix[bot] May 7, 2026
34e2746
update `oidc-mytoken/lib` dependency to v0.8.1-0.20260507130659-1d2d0…
zachmann May 7, 2026
3f46a5b
Merge pull request #82 from oidc-mytoken/new-features
zachmann May 7, 2026
ed407f4
update README: adjust documentation link, add installation and usage …
zachmann May 8, 2026
d68ac19
Merge pull request #83 from oidc-mytoken/new-features
zachmann May 8, 2026
bbc7285
Bump golang.org/x/text from 0.36.0 to 0.37.0
dependabot[bot] May 8, 2026
e9ab982
Merge pull request #84 from oidc-mytoken/dependabot/go_modules/golang…
zachmann May 11, 2026
a91f5ad
Bump github.com/urfave/cli/v3 from 3.8.0 to 3.9.0
dependabot[bot] May 12, 2026
c8f368f
Merge pull request #85 from oidc-mytoken/dependabot/go_modules/github…
zachmann May 13, 2026
b007a31
replace custom tag table output logic with reusable `tablewriter` uti…
zachmann May 18, 2026
6bd3dd4
add error handling for empty access tokens and mytokens returned by t…
zachmann May 19, 2026
48b6e75
add ssh support for calendars, notifications, tags, email, and token …
zachmann Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .gitlab-ci-scripts/upload.sh

This file was deleted.

51 changes: 48 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
include:
- 'https://codebase.helmholtz.cloud/m-team/tools/ci-voodoo/-/raw/master/ci-include/github-status-sync.yml'
- "https://codebase.helmholtz.cloud/m-team/tools/ci-voodoo/raw/master/ci-include/pipeline-jobs-publish-to-repo.yml"

variables:
UPSTREAM_PROJECT: oidc-mytoken/client
USE_GORELEASER: true

image: golang:1.22
image: golang:1.25
stages:
- build
- test
- lint
- package
- publish
- release

default:
Expand All @@ -34,7 +38,7 @@ test_race:
- go test -race -v ./...

staticcheck:
image: golang:1.22
image: golang:1.25
stage: lint
before_script:
- go install honnef.co/go/tools/cmd/staticcheck@latest
Expand All @@ -51,6 +55,48 @@ build:
script:
- go build github.com/oidc-mytoken/client/cmd/mytoken

# fixme: consider moving this to a central place (since it's similar in
# mytoken server and oinit)
package:
stage: package
image:
name: goreleaser/goreleaser
entrypoint: [ "" ]
services:
- docker:dind
# only:
# refs:
# - tags
# - prerel
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
REPO_HOST: repo.data.kit.edu
REPO_USER: cicd
DOCKER_REGISTRY: https://index.docker.io/v1/
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin "$DOCKER_REGISTRY"
script:
- |
[[ "$CI_COMMIT_BRANCH" == "${PREREL_BRANCH_NAME}" ]] && {
echo "Running set-prerel-version"
.gitlab-ci-scripts/set-prerel-version.sh
}
[[ "$CI_COMMIT_BRANCH" != "${PREREL_BRANCH_NAME}" ]] && {
[[ "$CI_COMMIT_BRANCH" != "${CI_DEFAULT_BRANCH}" ]] && {
# we're on a devel branch
echo "Running set-devel-version"
.gitlab-ci-scripts/set-prerel-version.sh --devstring dev
}
}
.gitlab-ci-scripts/goreleaser.sh

artifacts:
paths:
- "results/*"
after_script:
- curl -d "repo=github.com/oidc-mytoken/server" https://goreportcard.com/checks

prerelease:
stage: release
image:
Expand All @@ -75,6 +121,5 @@ prerelease:
script:
- if [ -z "$CI_COMMIT_TAG" ]; then .gitlab-ci-scripts/set-prerel-version.sh; fi;
- .gitlab-ci-scripts/goreleaser.sh
- .gitlab-ci-scripts/upload.sh
after_script:
- curl -d "repo=github.com/oidc-mytoken/client" https://goreportcard.com/checks
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2024 Gabriel Zachmann
Copyright (c) 2020-2026 Gabriel Zachmann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![License](https://img.shields.io/github/license/oidc-mytoken/client.svg)](https://github.com/oidc-mytoken/client/blob/master/LICENSE)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/oidc-mytoken/client)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/oidc-mytoken/client/Go)
[![Go Report](https://goreportcard.com/badge/github.com/oidc-mytoken/client)](https://goreportcard.com/report/github.com/oidc-mytoken/client)
[![DeepSource](https://deepsource.io/gh/oidc-mytoken/client.svg/?label=active+issues&show_trend=true)](https://deepsource.io/gh/oidc-mytoken/client/?ref=repository-badge)
[![Release date](https://img.shields.io/github/release-date/oidc-mytoken/client.svg)](https://github.com/oidc-mytoken/client/releases/latest)
Expand All @@ -24,7 +23,49 @@ any device. These `mytokens` can be restricted according to the particular use c
A demo instance of the server and webinterface is available at
[https://mytoken.data.kit.edu/](https://mytoken.data.kit.edu/).

Documentation is available at [https://mytoken-docs.data.kit.edu/](https://mytoken-docs.data.kit.edu/).
Documentation is available at [https://docs.mytok.eu/](https://docs.mytok.eu/).

A go library for interacting with the mytoken server can be found at
[https://github.com/oidc-mytoken/lib](https://github.com/oidc-mytoken/lib).

# Quickstart

## Installation

Packaged versions are available from http://repo.data.kit.edu

The latest version can also be installed via `go`:

```bash
go install github.com/oidc-mytoken/client/cmd/mytoken@latest
```

## Basic Usage

### Obtain a mytoken

Get a mytoken:

```bash
mytoken MT --url <mytoken_url> -i <oidc_issuer_url> -o <path_to_MT>
```

The mytoken will be stored in `<path_to_MT>`.

### Get an Access Token

Use your mytoken to obtain an OIDC access token:

```bash
mytoken AT --MT-file <path_to_MT>
```

## Using Mytokens

Mytokens can be provided in several ways:

- **File** (default): Stored in `~/.mytoken/default/mytoken`
- **Environment variable**: `mytoken AT --MT-env MYTOKEN_VAR`
- **From file**: `mytoken AT --MT-file /path/to/token`
- **Interactive prompt**: `mytoken AT --MT-prompt`
- **Direct**: `mytoken AT --MT <token>` (less secure)
2 changes: 1 addition & 1 deletion cmd/mytoken/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package main

import (
"context"
"fmt"

mytokenlib "github.com/oidc-mytoken/lib"
"github.com/oidc-mytoken/utils/httpclient"
"golang.org/x/net/context"

"github.com/oidc-mytoken/client/internal/commands"
"github.com/oidc-mytoken/client/internal/model/version"
Expand Down
43 changes: 24 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,46 +1,51 @@
module github.com/oidc-mytoken/client

go 1.22
go 1.25.0

require (
github.com/Songmu/prompter v0.5.1
github.com/gliderlabs/ssh v0.3.7
github.com/mdp/qrterminal/v3 v3.2.0
github.com/oidc-mytoken/api v0.11.1
github.com/oidc-mytoken/lib v0.7.1
github.com/gliderlabs/ssh v0.3.8
github.com/mattn/go-isatty v0.0.22
github.com/mdp/qrterminal/v3 v3.2.1
github.com/oidc-mytoken/api v0.12.2-0.20260529132908-2e1359c93a95
github.com/oidc-mytoken/lib v0.8.1-0.20260507130659-1d2d0a003337
github.com/oidc-mytoken/utils v0.1.2
github.com/olekukonko/tablewriter v0.0.5
github.com/olekukonko/tablewriter v1.1.4
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.3
github.com/urfave/cli/v2 v2.3.1-0.20211205195634-e8d81738896c
golang.org/x/net v0.27.0
golang.org/x/term v0.22.0
github.com/sirupsen/logrus v1.9.4
github.com/urfave/cli/v3 v3.9.0
golang.org/x/text v0.37.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/clipperhouse/displaywidth v0.11.0 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/coreos/go-oidc/v3 v3.4.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/go-resty/resty/v2 v2.7.0 // indirect
github.com/goccy/go-json v0.10.6 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-runewidth v0.0.23 // indirect
github.com/olekukonko/cat v0.0.0-20250911104152-50322a0618f6 // indirect
github.com/olekukonko/errors v1.3.0 // indirect
github.com/olekukonko/ll v0.1.8 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.41.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/crypto v0.50.0 // indirect
golang.org/x/net v0.53.0 // indirect
golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/sys v0.43.0 // indirect
golang.org/x/term v0.42.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
rsc.io/qr v0.2.0 // indirect
)

replace github.com/urfave/cli/v2 => github.com/zachmann/cli/v2 v2.3.1-0.20211220102037-d619fd40a704
Loading
Loading