types

package
v0.0.0-...-4747e9d Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	V0             UserMeta `yaml:"v0"`
	ServerAddress  int      `yaml:"serverAddress"`
	AuthSigningKey string   `yaml:"authSigningKey"`
}

AuthConfig ...

type AuthResponse

type AuthResponse struct {
	Provider Provider `json:"provider,omitempty"`
	Error    string   `json:"error,omitempty"`
}

AuthResponse ...

type AuthorizationResponse

type AuthorizationResponse struct {
	APIVersion string               `json:"apiVersion,omitempty"`
	Kind       string               `json:"kind,omitempty"`
	Status     *AuthorizationStatus `json:"status,omitempty"`
}

Authorization response

type AuthorizationStatus

type AuthorizationStatus struct {
	Allowed bool   `json:"allowed,omitempty"`
	Denied  bool   `json:"denied,omitempty"`
	Reason  string `json:"reason,omitempty"`
}

type ConfigMap

type ConfigMap struct {
	AuthConfig AuthConfig `yaml:"authConfig"`
}

ConfigMap maps all the configuration needed by auth

type JWTClaimsJSON

type JWTClaimsJSON struct {
	Iat      int64    `json:"iat"`
	UID      string   `json:"uid"`
	Username string   `json:"username"`
	Expiry   int64    `json:"exp"`
	Groups   []string `json:"groups"`
}

JWTClaimsJSON is used for decoding an incoming JSON JWT payload to the /authenticate API

func (JWTClaimsJSON) Valid

func (c JWTClaimsJSON) Valid() error

Valid so that JWTClaimsJSON satisfies the jwt.Claims interface

type Provider

type Provider struct {
	Name  string `json:"name,omitempty"`
	Token Token  `json:"token,omitempty"`
}

Provider ...

type RawAuthResponse

type RawAuthResponse struct {
	Provider   Provider
	Error      error
	HTTPStatus int
}

RawAuthResponse ...

type Request

type Request struct {
	APIVersion string `json:"apiVersion,omitempty"`
	Kind       string `json:"kind,omitempty"`
	Spec       *Spec  `json:"spec,omitempty"`
}

Request maps the incoming auth request from api-server

type Spec

type Spec struct {
	Token string `json:"token,omitempty"`
}

Spec maps to the bearer token send by api-server

type Status

type Status struct {
	Authenticated *bool `json:"authenticated,omitempty"`
	User          *User `json:"user,omitempty"`
}

Status indicates if user is authenticated or not

type Token

type Token struct {
	JWT    string `json:"jwt,omitempty"`
	Expiry int64  `json:"expiry,omitempty"`
}

Token return JWT with its expiry time

type User

type User struct {
	Username string   `json:"username,omitempty"`
	EMail    string   `json:"email,omitempty"`
	UID      string   `json:"uid,omitempty"`
	Groups   []string `json:"groups,omitempty"`
}

User holds user information from AD

type UserCredentials

type UserCredentials struct {
	UserName string
	Password string
}

UserCredentials is a simple username/password pair

type UserDetails

type UserDetails struct {
	UserName string   `yaml:"userName"`
	Password string   `yaml:"password"`
	Email    string   `yaml:"email"`
	UID      string   `yaml:"uid"`
	Groups   []string `yaml:"groups"`
}

UserDetails - User Details

type UserDetailsConfig

type UserDetailsConfig struct {
	UserDetails map[string]UserDetails `yaml:"userDetails"`
}

UserDetailsConfig - User Details config

type UserInfo

type UserInfo struct {
	APIVersion string  `json:"apiVersion,omitempty"`
	Kind       string  `json:"kind,omitempty"`
	Status     *Status `json:"status,omitempty"`
}

UserInfo holds authentication information

type UserMeta

type UserMeta struct {
	Source             string `yaml:"source"`
	UserDetailFilePath string `yaml:"userDetailFilePath"`
}

UserMeta - User detail for V0 api

type V1Token

type V1Token struct {
	Token  string `json:"token,omitempty"`
	Expiry int64  `json:"expiry,omitempty"`
}

V1Token ...

Jump to

Keyboard shortcuts

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