https://github.com/zhima-mochi/go-authentication-service
The go-authentication-service package is a comprehensive authentication solution for Go applications. It provides various components and utilities to facilitate user authentication and session management.
https://github.com/zhima-mochi/go-authentication-service
authentication cookie golang session
Last synced: 11 months ago
JSON representation
The go-authentication-service package is a comprehensive authentication solution for Go applications. It provides various components and utilities to facilitate user authentication and session management.
- Host: GitHub
- URL: https://github.com/zhima-mochi/go-authentication-service
- Owner: Zhima-Mochi
- License: apache-2.0
- Created: 2023-05-08T12:20:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-27T10:34:44.000Z (about 3 years ago)
- Last Synced: 2025-03-30T08:26:17.968Z (about 1 year ago)
- Topics: authentication, cookie, golang, session
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Authentication Service
The `go-authentication-service` package is a comprehensive authentication solution for Go applications. It provides various components and utilities to facilitate user authentication and session management. This README document serves as a guide to understand the structure and usage of the package.
## Table of Contents
- [Directory Structure](#directory-structure)
- [Installation](#installation)
- [Components](#components)
- [Auth Registry](#auth-registry)
- [Cookie Manager](#cookie-manager)
- [Session Manager](#session-manager)
- [Utility](#utility)
- [Example](#example)
- [License](#license)
## Directory Structure
The `go-authentication-service` package follows the following directory structure:
```
├── external
│ ├── cache_interface.go
│ └── encryptor_interface.go
└── service
├── authRegistry
│ ├── authRegistry.go
│ └── authRegistry_interface.go
├── cookieManager
│ ├── cookieManager.go
│ └── cookieManager_interface.go
├── sessionManager
│ ├── option.go
│ ├── session
│ │ ├── session.go
│ │ └── session_interface.go
│ ├── sessionManager.go
│ └── sessionManager_interface.go
└── utility
├── cache.go
├── encryptor.go
└── encryptorOption.go
```
## Installation
To install the `go-authentication-service` package, you can use the `go get` command:
```shell
go get github.com/Zhima-Mochi/go-authentication-service
```
## Components
The `go-authentication-service` package consists of the following components:
### Auth Registry
The `Auth Registry` component provides functionality to register and manage oauth2 authentication providers.
See [Auth Registry Interface](./service/authRegistry/authRegistry_interface.go) for more details.
### Cookie Manager
The `Cookie Manager` component handles the management of cookies related to user sessions.
See [Cookie Manager Interface](./service/cookieManager/cookieManager_interface.go) for more details.
### Session Manager
The `Session Manager` component is responsible for managing user sessions.
See [Session Manager Interface](./service/sessionManager/sessionManager_interface.go) for more details.
### Utility
The `Utility` package provides various utility functions used by the authentication service and also offers implementations of interfaces defined in the `external` package.
See [Utility Folder](./service/utility) for more details.
## Example
See [Example](./example/main.go) for a simple example of how to use the `go-authentication-service` package.
## License
The `go-authentication-service` package is distributed under the [LICENSE](./LICENSE) file. Please refer to the license for more details.