Categorygithub.com/klyngen/golang-oidc-discovery
modulepackage
1.1.0
Repository: https://github.com/klyngen/golang-oidc-discovery.git
Documentation: pkg.go.dev

# README

OIDC Discovery client

This package covers two needs:

  1. Get the discovery document from some authority
  2. Get certificates from that authority

Usage

package main

import (
... your important stuff
"github.com/klyngen/golang-oidc-discovery"
)

func main() {
client, \_ := new oidcdiscovery.NewOidcDiscoveryClient("https://your-oidc-provider.com")

    // Now that you have all the good stuff you can do whatever you want

    // Getting certificates is really easy
    publicKeys, _ := client.GetCertificates();

    // This method returns the certificate with BEGIN and END
    publicKeys[0].GetCertificate();

    // Property of the struct and is without the BEGIN and END
    publicKeys[0].Key;

}

Happy hacking

# Functions

NewOidcDiscoveryClient instantiates a new confiuration.

# Structs

DiscoveryDocument is the discovery document structure.
JwksEndpointResponse is the response from the JWKS-endoint.
OidcDiscoveryClient describes a OIDC Configuration of a given authority.
No description provided by the author