Skip to content

Commit

Permalink
Merge pull request #2 from Sovietaced/readme
Browse files Browse the repository at this point in the history
Add examples to README
  • Loading branch information
Sovietaced authored Jan 2, 2024
2 parents cd7b4fb + e835161 commit a7210d0
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,27 @@
[![Go Report](https://goreportcard.com/badge/github.com/sovietaced/okta-jwt-verifier)](https://goreportcard.com/report/github.com/sovietaced/okta-jwt-verifier)

Alternative implementation to the official [okta-jwt-verifier](https://github.com/okta/okta-jwt-verifier-golang) that
includes support for telemetry (ie. OpenTelemetry), minimizing operational latency, and testability.
includes support for telemetry (ie. OpenTelemetry), minimizing operational latency, and testability.

## Examples

### ID Token Validation

```go
import (
"context"
verifier "github.com/sovietaced/okta-jwt-verifier"
)

func main() {
ctx := context.Background()
issuer := "https://test.okta.com"
clientId := "test"
v := verifier.NewVerifier(issuer, clientId)

idToken := "..."
token, err := v.VerifyIdToken(ctx, idToken)
}

```

0 comments on commit a7210d0

Please sign in to comment.