auth

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Token = "token"
	Auth  = "auth"
	Login = "login"
	SMTP  = "smtp-management"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	*core.Service
}

func NewService

func NewService(hostUrl *string, root *core.Root) *Service

func (*Service) CreateSmtpDetails added in v0.0.5

func (s *Service) CreateSmtpDetails(requestBody SmtpRequest) (model.Smtp, error)

func (*Service) GetAccessToken

func (s *Service) GetAccessToken() (*TokenResponse, error)

GetAccessToken - Get a new token for user

func (*Service) GetSmtpDetails added in v0.0.4

func (s *Service) GetSmtpDetails() (model.Smtp, error)

func (*Service) Login added in v1.1.0

func (s *Service) Login() error

Login - Logs in user and return cookies

func (*Service) UpdateSmtpDetails added in v0.0.4

func (s *Service) UpdateSmtpDetails(requestBody SmtpRequest) (model.Smtp, error)

type SmtpRequest added in v0.0.4

type SmtpRequest struct {
	Host       string `json:"host"`
	Port       string `json:"port"`
	From       string `json:"from"`
	UserName   string `json:"username"`
	Password   string `json:"password"`
	TlsEnabled string `json:"tlsEnabled"`
	Auth       string `json:"auth"`
}

type TokenRequest

type TokenRequest struct {
	ApiKey        string `json:"apiKey"`
	ClientId      string `json:"clientId"`
	ClientSecret  string `json:"clientSecret"`
	AccessToken   string `json:"accessToken"`
	OrgId         string `json:"orgId"`
	OAuthAppTypes string `json:"oAuthAppTypes"`
	Username      string `json:"username"`
	Password      string `json:"password"`
}

type TokenResponse

type TokenResponse struct {
	Token string `json:"token"`
}

TokenResponse -

Jump to

Keyboard shortcuts

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