siamauth

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 4 Imported by: 0

README

SIAM UB Auth

https://siam.ub.ac.id authentication with scraping method

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version string = "0.1.0"

	ErrorNotLoggedIn error = errors.New("please login first")
	ErrorLoggedIn    error = errors.New("already logged in")
)

Functions

This section is empty.

Types

type User

type User struct {
	Account struct {
		NIM          string
		Nama         string
		Jenjang      string
		Fakultas     string
		Jurusan      string
		ProgramStudi string
		Seleksi      string
		NomorUjian   string
	}
	LoginStatus bool
	// contains filtered or unexported fields
}

func NewUser

func NewUser() User

constructor

func (*User) GetData

func (s *User) GetData() error

func (*User) Login

func (s *User) Login(us string, ps string) error

func (*User) Logout

func (s *User) Logout() error

make sure to defer this method after login, so the phpsessionid won't be misused

Jump to

Keyboard shortcuts

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