Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRelogin = fnerrors.New("not logged in, please run `ns login`")
View Source
var (
NamespaceJwtPublicKeyFile string
)
Functions ¶
func GenerateToken ¶ added in v0.0.136
GenerateToken generates token based on provided options. If no options provided an error would be returned.
func StoreMarshalledUser ¶ added in v0.0.136
Types ¶
type AuthOpt ¶ added in v0.0.136
type AuthOpt func(*authConfig)
func WithGithubOIDC ¶ added in v0.0.136
WithGithubOIDC an option to use Github OIDC provider to generate JWT.
func WithGithubTokenExchange ¶ added in v0.0.142
func WithGithubTokenExchange(githubTokenExchange func(context.Context, string) (string, error)) AuthOpt
WithGithubTokenExchange an option to exchange GitHub JWTs for Namespace JWTs.
func WithUserAuth ¶ added in v0.0.136
WithUserAuth an option to use existing `UserAuth` credentials to get JWT.
type UserAuth ¶ added in v0.0.136
type UserAuth struct { Username string `json:"username,omitempty"` Org string `json:"org,omitempty"` // The organization this user is acting as. Only really relevant for robot accounts which authenticate against a repository. InternalOpaque []byte `json:"opaque,omitempty"` Clerk *clerk.State `json:"clerk,omitempty"` IsGithubAction bool `json:"is_github_action,omitempty"` }
Click to show internal directories.
Click to hide internal directories.