v2

package
v0.0.0-...-8fe0c81 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: GPL-3.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChangePasswordUrlPath = "/auth/v1/changePassword"
View Source
var LoginUrlPath = "/auth/v2/login"
View Source
var ValidateTokenUrlPath = "/auth/v2/validateToken"

Functions

This section is empty.

Types

type AuthClient

type AuthClient struct {
	Id     string `json:"id"`
	Secret string `json:"secret"`
}

type ChangePasswordRequest

type ChangePasswordRequest struct {
	OldPassword string     `json:"oldPassword"`
	NewPassword string     `json:"newPassword"`
	Client      AuthClient `json:"client"`
}

type LoginRequest

type LoginRequest struct {
	Login         string     `json:"login"`
	Password      string     `json:"password"`
	GenerateToken bool       `json:"generateToken"`
	Client        AuthClient `json:"client"`
}

type LoginResponse

type LoginResponse struct {
	Username      string        `json:"username"`
	CommonNames   []string      `json:"commonNames"`
	Uid           string        `json:"uid"`
	Emails        []string      `json:"emails"`
	EmailVerified bool          `json:"emailVerified"` // Not used for now
	Groups        []string      `json:"groups"`
	Token         string        `json:"token"`
	ClientTTL     time.Duration `json:"clientTTL"`
}

type ValidateTokenRequest

type ValidateTokenRequest struct {
	Token  string     `json:"token"`
	Client AuthClient `json:"client"`
}

type ValidateTokenResponse

type ValidateTokenResponse struct {
	Token string `json:"token"`
	Valid bool   `json:"valid"`
}

Jump to

Keyboard shortcuts

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