server_auth

package
v0.0.0-...-566b5d1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2011 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyAuth

type DummyAuth struct {
	Result bool
}

DummyAuth is a no-op authentication server, always returning the value of 'Valid'.

func (*DummyAuth) Authenticate

func (d *DummyAuth) Authenticate(serverId, user string) (authenticated bool, err os.Error)

Authenticate implements the IAuthenticator.Authenticate method

type IAuthenticator

type IAuthenticator interface {
	Authenticate(string, string) (bool, os.Error)
}

An IAuthenticator takes a serverId and a user string and attempts to authenticate against a server. This interface allows for the use of a dummy authentication server for testing purposes.

type ServerAuth

type ServerAuth struct {
	Url string
}

ServerAuth represents authentication against a server, particularly the main minecraft server at http://www.minecraft.net/game/checkserver.jsp.

func (*ServerAuth) Authenticate

func (s *ServerAuth) Authenticate(serverId, user string) (authenticated bool, err os.Error)

Authenticate implements the IAuthenticator.Authenticate method

func (*ServerAuth) BuildQuery

func (s *ServerAuth) BuildQuery(serverId, user string) (query string)

Build a URL+query string based on a given server URL, serverId and user input

Jump to

Keyboard shortcuts

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