username

package
v1.0.0-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalSANS added in v0.6.0

func MarshalSANS(name string, critical bool) (*pkix.Extension, error)

MarshalSANS creates a Subject Alternative Name extension with an OtherName sequence. RFC 5280, 4.2.1.6:

SubjectAltName ::= GeneralNames GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName GeneralName ::= CHOICE {

otherName                       [0]     OtherName,
... }

func PrincipalFromIDToken

func PrincipalFromIDToken(ctx context.Context, token *oidc.IDToken) (identity.Principal, error)

func UnmarshalSANS added in v0.6.0

func UnmarshalSANS(exts []pkix.Extension) (string, error)

UnmarshalSANs extracts a UTF-8 string from the OtherName field in the Subject Alternative Name extension.

Types

type OtherName added in v0.6.0

type OtherName struct {
	ID    asn1.ObjectIdentifier
	Value string `asn1:"utf8,explicit,tag:0"`
}

OtherName describes a name related to a certificate which is not in one of the standard name formats. RFC 5280, 4.2.1.6:

OtherName ::= SEQUENCE {
     type-id    OBJECT IDENTIFIER,
     value      [0] EXPLICIT ANY DEFINED BY type-id }

OtherName for Fulcio-issued certificates only supports UTF-8 strings as values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL