MCPcopy Index your code
hub / github.com/ctron/oidc-cli

github.com/ctron/oidc-cli @v0.7.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.7.3 ↗ · + Follow
72 symbols 105 edges 17 files 7 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

OIDC CLI

crates.io GitHub release (latest SemVer) CI

A command line tool for working with OIDC

Installation

  • Download a released binary: https://github.com/ctron/oidc-cli/releases

  • From source with cargo:

bash cargo install oidc-cli

  • A binary with cargo-binstall:

bash cargo binstall oidc-cli

  • On Windows, you can use winget:

commandline winget install ctron.oidc

  • With brew to you can:

bash brew tap ctron/tap brew install ctron/tap/oidc

  • With snap you can:

bash snap install oidc

Example

Creating a new (confidential) client:

oidc create confidential my-client --issuer https://example.com/realm --client-id foo --client-secret bar

Creating a new (public) client:

oidc create public my-client --issuer https://example.com/realm --client-id foo

Then, get an access token:

oidc token my-client

Or combine it with e.g., HTTPie:

http example.com/api "Authorization:$(oidc token my-client --bearer)"

Or even shorter:

http example.com/api $(oidc token -H my-client)

This also works with curl:

curl http://example.com/api -H $(oidc token -H my-client)

More examples

Create a public client from an initial refresh token. This can be useful if you have a frontend application, but no means of performing the authorization code flow with a local server. In case you have access to the refresh token, e.g via the browsers developer console, you can initialize the public client with that:

oidc create public my-client --issuer https://example.com/realm --client-id foo --refresh-token <refresh-token>

Core symbols most depended-on inside this repo

store
called by 4
src/config.rs
extra_scopes
called by 3
src/oidc.rs
store_to
called by 2
src/config.rs
create_client
called by 2
src/http.rs
fetch_token
called by 2
src/oidc.rs
get_token
called by 2
src/oidc.rs
refresh_token_request
called by 2
src/oidc.rs
run
called by 2
src/cmd/mod.rs

Shape

Method 27
Class 21
Function 17
Enum 7

Languages

Rust100%

Modules by API surface

src/config.rs12 symbols
src/server.rs10 symbols
src/oidc.rs7 symbols
src/main.rs5 symbols
src/cmd/create/mod.rs5 symbols
src/http.rs4 symbols
src/cmd/list.rs4 symbols
src/cmd/create/public.rs4 symbols
src/cmd/completion.rs4 symbols
src/utils/inspect.rs3 symbols
src/utils/mod.rs2 symbols
src/cmd/token.rs2 symbols

For agents

$ claude mcp add oidc-cli \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact