auth-library

module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0

README

auth-library

Auth library for a standard auth interface across microservices

Installation

To install this package, use go get:

go get github.com/rokmetro/auth-library

This will then make the following packages available to you:

github.com/rokmetro/auth-library/authservice
github.com/rokmetro/auth-library/tokenauth
github.com/rokmetro/auth-library/sigauth

Import the auth-library/authservice package into your code using this template:

package yours

import (
  ...

  "github.com/rokmetro/auth-library/authservice"
)

func main() {
    serviceLoader := authservice.NewRemoteServiceRegLoader("https://auth.rokmetro.com", nil)
	authService, err := authservice.NewAuthService("example", "https://sample.rokmetro.com", serviceLoader)
	if err != nil {
		log.Fatalf("Error initializing auth service: %v", err)
	}

    ...
}
Staying up to date

To update auth-library to the latest version, use go get -u github.com/rokmetro/auth-library.

Directories

Path Synopsis
example
internal

Jump to

Keyboard shortcuts

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