security

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseCredentials

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

BaseCredentials is base implementation for Credentials interface.

func (*BaseCredentials) ClassID

func (bc *BaseCredentials) ClassID() int32

func (*BaseCredentials) Endpoint

func (bc *BaseCredentials) Endpoint() string

func (*BaseCredentials) FactoryID

func (bc *BaseCredentials) FactoryID() int32

func (*BaseCredentials) Principal

func (bc *BaseCredentials) Principal() string

func (*BaseCredentials) ReadPortable

func (bc *BaseCredentials) ReadPortable(reader serialization.PortableReader) (err error)

func (*BaseCredentials) SetEndpoint

func (bc *BaseCredentials) SetEndpoint(endpoint string)

func (*BaseCredentials) WritePortable

func (bc *BaseCredentials) WritePortable(writer serialization.PortableWriter) (err error)

type Credentials

type Credentials interface {
	// Endpoint returns ip address of endpoint.
	Endpoint() string

	// SetEndpoint sets ip address of endpoint.
	SetEndpoint(endpoint string)

	// Principal returns principal of endpoint.
	Principal() string
}

Credentials is a container object for endpoint (Members and Clients) security attributes. It is used on authentication process by {@link javax.security.auth.spi.LoginModule}s.

type UsernamePasswordCredentials

type UsernamePasswordCredentials struct {
	*BaseCredentials
	// contains filtered or unexported fields
}

UsernamePasswordCredentials is a simple implementation of Credentials using username and password as security attributes.

func NewUsernamePasswordCredentials

func NewUsernamePasswordCredentials(username string, password string) *UsernamePasswordCredentials

NewUsernamePasswordCredentials returns UsernamePassWordCredentials with the given parameters.

func (*UsernamePasswordCredentials) Password

func (upc *UsernamePasswordCredentials) Password() string

Password returns credentials password.

func (*UsernamePasswordCredentials) ReadPortable

func (upc *UsernamePasswordCredentials) ReadPortable(reader serialization.PortableReader) (err error)

func (*UsernamePasswordCredentials) Username

func (upc *UsernamePasswordCredentials) Username() string

Username returns credentials username.

func (*UsernamePasswordCredentials) WritePortable

func (upc *UsernamePasswordCredentials) WritePortable(writer serialization.PortableWriter) (err error)

Jump to

Keyboard shortcuts

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