iitkgp_erp_login

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 23 Imported by: 1

README

Contributors Forks Stargazers Issues MIT License Wiki

ERP Login Module

Report Bug · Request Feature

Table of Contents

About The Project

This package automates the login workflow for IIT Kharagpur ERP.

(back to top)

Supports:
  1. Shells
    • bash
    • zsh
  2. OS(s)
    • any *nix[GNU+Linux and Unix]

(back to top)

Getting Started

To set up a local instance of the application, follow the steps below.

Prerequisites

The following dependencies are required to be installed for the project to function properly:

  • Go
  • IIT-KGP student ERP account

(back to top)

Installation

Now that the environment has been set up and configured to properly compile and run the project, the next step is to install and configure the project locally on your system.

  1. Clone the repository
    git clone https://github.com/metakgp/iitkgp-erp-login-go
    
  2. Install dependencies
    cd ./iitkgp-erp-login-go
    go mod download
    

(back to top)

Usage

The following code logs in to ERP and opens ERP homepage in the browser.

package main

import (
	erp "github.com/metakgp/iitkgp-erp-login-go"

	"github.com/pkg/browser"
)

func main() {
	_, ssoToken := erp.ERPSession()
	
	browser.OpenURL(erp.HOMEPAGE_URL + "?" + ssoToken)
}
Projects using ERP Login Package Go

Maintainer(s)

(back to top)

Contact

📫 MetaKGP - Metakgp's slack invite Metakgp's email metakgp's Facebook metakgp's LinkedIn metakgp's Twitter metakgp's Instagram

(back to top)

Additional documentation

(back to top)

Documentation

Index

Constants

View Source
const (
	PING_URL            = "iitkgp.ac.in"
	HOMEPAGE_URL        = "https://erp.iitkgp.ac.in/IIT_ERP3/"
	WELCOMEPAGE_URL     = "https://erp.iitkgp.ac.in/IIT_ERP3/welcome.jsp" // Only accessible when NOT logged in
	LOGIN_URL           = "https://erp.iitkgp.ac.in/SSOAdministration/auth.htm"
	SECRET_QUESTION_URL = "https://erp.iitkgp.ac.in/SSOAdministration/getSecurityQues.htm"
	OTP_URL             = "https://erp.iitkgp.ac.in/SSOAdministration/getEmilOTP.htm" // blame ERP for the typo
)
View Source
const (
	RedirectURL = "http://localhost:7007"
)

Variables

This section is empty.

Functions

func ERPSession

func ERPSession() (*http.Client, string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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