credentials

package
v0.0.0-...-7d41a23 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package credentials regroups all infra (driven-side) implementations of the credentials domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeLdapServerURL

func NormalizeLdapServerURL(s string) (string, error)

NormalizeLdapServerURL is opinionated normalization of a string that represents a URL. Returns the URL provided matching the format expected when storing a URL in a config. Sets a scheme and port if not present, removes unnecessary trailing slashes, etc. Can be used to normalize a URL provided by user input.

func NormalizeLdapServerURLWithCred

func NormalizeLdapServerURLWithCred(s string, username string) (string, error)

NormalizeLdapServerURLWithCred will append username information to the URL

Types

type HelperStorage

type HelperStorage struct {
	// contains filtered or unexported fields
}

HelperStorage provides storage for credentials

func NewHelperStorage

func NewHelperStorage() HelperStorage

NewHelperStorage create a new YAML storage

func (HelperStorage) GetCredentials

func (s HelperStorage) GetCredentials(url string, user string) (credentials.Credentials, error)

GetCredentials retrieve password for URL and User.

func (HelperStorage) RemoveCredentials

func (s HelperStorage) RemoveCredentials(url string, user string) error

RemoveCredentials remove credentials for URL and User.

func (HelperStorage) SetCredentials

func (s HelperStorage) SetCredentials(c credentials.Credentials) error

SetCredentials store credentials.

Jump to

Keyboard shortcuts

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