WithID (authrequest/authrequest.go)

iota-sdk · modules/oidc/domain/entities/authrequest/authrequest.go · go · Apache-2.0
auth, tag:embed-classified

Go package implementing OIDC AuthRequest with functional options and business logic.

// Source: https://github.com/iota-uz/iota-sdk | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Package authrequest provides this package.
package authrequest

import (
	"time"

	"github.com/google/uuid"
)

// Option is a functional option for configuring AuthRequest
type Option func(*authRequest)

// --- Option setters ---

func WithID(id uuid.UUID) Option {
	return func(a *authRequest) {
		a.id = id
	}
}

func WithState(state string) Option {
	return func(a *authRequest) {
		a.state = &state
	}
}

func WithNonce(nonce string) Option {
	return func(a *authRequest) {
		a.nonce = &nonce
	}
}

func WithCodeChallenge(challenge, method string) Option {
	return func(a *authRequest) {

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key