mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Added more API documentation
This commit is contained in:
parent
2bc3c74277
commit
f7b08da064
8 changed files with 150 additions and 90 deletions
|
|
@ -8,6 +8,17 @@ import (
|
|||
"github.com/pkg/browser"
|
||||
)
|
||||
|
||||
// Login() initiates the process to retrieve an access token from an identity provider.
|
||||
// This function is especially designed to work by OPAAL, but will propably be changed
|
||||
// in the future to be more agnostic.
|
||||
//
|
||||
// The 'targetHost' and 'targetPort' parameters should point to the target host/port
|
||||
// to create a temporary server to receive the access token. If an empty 'targetHost'
|
||||
// or an invalid port range is passed, then neither of the parameters will be used
|
||||
// and no server will be started.
|
||||
//
|
||||
// Returns an access token as a string if successful and nil error. Otherwise, returns
|
||||
// an empty string with an error set.
|
||||
func Login(loginUrl string, targetHost string, targetPort int) (string, error) {
|
||||
var accessToken string
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue