RESTful Server Systems [DEPRECATED]

Tideland GoREST

Description

Tideland GoREST helps developing RESTful server systems. It provides a convenient mapping of URL to handlers and methods specific to the called HTTP method. Additionally there are helpers for marshalling and unmarshalling.

The library earlier has been known as web package of the Tideland Go Library.

I hope you like it. ;)

GitHub release GitHub license GoDoc Sourcegraph Go Report Card

Version

Version 2.15.5

Packages

REST

RESTful web request handling.

Request

Convenient client requests to RESTful web services.

Handlers

Some general purpose handlers for the library.

JSON Web Token

JWT package for secure authentication and information exchange like claims.

REST Audit

Helpers for the unit tests of the Go REST Server Library.

Contributors

License

Tideland Go REST Server Library is distributed under the terms of the BSD 3-Clause license.

Owner
Tideland
Tideland Open-Source Software
Tideland
Comments
  • HTTP-Statuscode 420

    HTTP-Statuscode 420

    I would be glad, if you could add a constant for the HTTP status code 420. :blush:

    
                                                        /
                                                      .7
                                           \       , //
                                           |\.--._/|//
                                          /\ ) ) ).'/
                                         /(  \  // /
                                        /(   J`((_/ \
                                       / ) | _\     /
                                      /|)  \  eJ    L
                                     |  \ L \   L   L
                                    /  \  J  `. J   L
                                    |  )   L   \/   \
                                   /  \    J   (\   /
                 _....___         |  \      \   \```
          ,.._.-'        '''--...-||\     -. \   \
        .'.=.'                    `         `.\ [ Y
       /   /                                  \]  J
      Y / Y                                    Y   L
      | | |          \                         |   L
      | | |           Y                        A  J
      |   I           |                       /I\ /
      |    \          I             \        ( |]/|
      J     \         /._           /        -tI/ |
       L     )       /   /'-------'J           `'-:.
       J   .'      ,'  ,' ,     \   `'-.__          \
        \ T      ,'  ,'   )\    /|        ';'---7   /
         \|    ,'L  Y...-' / _.' /         \   /   /
          J   Y  |  J    .'-'   /         ,--.(   /
           L  |  J   L -'     .'         /  |    /\
           |  J.  L  J     .-;.-/       |    \ .' /
           J   L`-J   L____,.-'`        |  _.-'   |
            L  J   L  J                  ``  J    |
            J   L  |   L                     J    |
             L  J  L    \                    L    \
             |   L  ) _.'\                    ) _.'\
             L    \('`    \                  ('`    \
              ) _.'\`-....'                   `-....'
             ('`    \
              `-.___/   
    
  • Public function AddTokenToRequest removed

    Public function AddTokenToRequest removed

    Hi, just tried to change from 2.15.2 to 2.15.3 and found an blocking issue. You have remove the function AddTokenToRequest from package jwt which is used in package request (see request.go line 446 ).

    You just change the patch version, i don't think this covers the removal of a public function.

  • Add Path() to Job

    Add Path() to Job

    Path() will return the URL path as slice of strings. Constants like PathService and PathResource will return the service part (index 0) and the resource part (index 1). This way via index 2, 3, etc. longer paths can better be accessed, e.g. in

    /shop/orders/12345/item/1
    
  • Add more restaudit response assertions

    Add more restaudit response assertions

    • Rename AssertContent() to AssertBody()
    • Rename AssertContentMatch() to AssertBodyMatches()
    • Add AssertBodyContains()
    • Add AssertHeaderEquals() and AssertCookieEquals()
  • Retrieve token from header with correct error

    Retrieve token from header with correct error

    • In case of no authentication header or header with invalid from no token but also no error is returned
    • Correct would no token but error about not found token
    • Add extra function for retrieval from HTTP request
    • Add function to check if a retrieval error signals no or malformed token
    • Retrieving token from job uses this function
  • Errorcode 405 when handler not implements method

    Errorcode 405 when handler not implements method

    When a handler not implements the requested method, the multiplexer returns an internal server (500) error like this:

    error handling request "DELETE /foo/bar": [REST:010] handler "foo/bar" is no handler for DELETE requests
    

    Using HTTP errorcode 405 (Method Not Allowed) would be more restful.

  • Released v2.14.0

    Released v2.14.0

    • Added access to URL path parts via Job.Path()
    • Added interfaces for handler methods directly mapping HTTP verbs to the according REST methods like Create(), Read(), Update(), Modify(), Delete(), and Info()
  • Add CRUDI interfaces

    Add CRUDI interfaces

    Add interfaces for Create(), Read(), Update(), Delete(), and Info(). So e.g. if for a GET request Get() isn't implemented test if Read() is implemented. This makes handlers better match the idea of REST and readable.

  • Release 2.13.0

    Release 2.13.0

    • Rename internal envelope to public Feedback in rest
    • Added ReadFeedback() to Response in request
    • Asserts in restaudit now internally increase the callstack offset so that the correct test line number is shown
    • Added Response.AssertBodyGrep() to restaudit
  • Version 2 12 0

    Version 2 12 0

    • Some renamings in Request and Response, sadly to the previous minor release
    • More convenience helpers for testing
    • Adopted new testing to more packages
    • Using http package constants instead of own plain strings
    • Added documentation to restaudit
  • [Proposal] Contribute to a benchmark

    [Proposal] Contribute to a benchmark

    Hi,

    I'm leading a benchmarking project => https://github.com/the-benchmarker/web-frameworks

    The purpose of this project is to compare performances (other indicators will come), based on a fairest, as we can, comparison for go frameworks (comparing on the same version, production-grade environments, same compilation options ...).

    Do you mind that I (or any member) add gorest ? :heart:

    Regards,

HTTP-server-with-auth# HTTP Server With Authentication

HTTP-server-with-auth# HTTP Server With Authentication Introduction You are to use gin framework package and concurrency in golang and jwt-go to imple

Nov 9, 2022
A standalone, specification-compliant, OAuth2 server written in Golang.
A standalone, specification-compliant,  OAuth2 server written in Golang.

Go OAuth2 Server This service implements OAuth 2.0 specification. Excerpts from the specification are included in this README file to describe differe

Dec 28, 2022
Golang OAuth2 server library

OSIN Golang OAuth2 server library OSIN is an OAuth2 server library for the Go language, as specified at http://tools.ietf.org/html/rfc6749 and http://

Dec 23, 2022
[NO LONGER MAINTAINED} oauth 2 server implementation in Go

hero hero is a feature rich oauth 2 server implementation in Go. Features User account management Client management oauth 2 rfc 6749 compliant Configu

Nov 18, 2022
Authentication server for Docker Registry 2

The original Docker Registry server (v1) did not provide any support for authentication or authorization. Access control had to be performed externally, typically by deploying Nginx in the reverse proxy mode with Basic or other type of authentication. While performing simple user authentication is pretty straightforward, performing more fine-grained access control was cumbersome.

Jan 2, 2023
Go library providing in-memory implementation of an OAuth2 Authorization Server / OpenID Provider

dispans Go library providing in-memory implementation of an OAuth2 Authorization Server / OpenID Provider. The name comes from the Swedish word dispen

Dec 22, 2021
Jan 9, 2023
an stateless OpenID Connect authorization server that mints ID Tokens from Webauthn challenges

Webauthn-oidc Webauthn-oidc is a very minimal OIDC authorization server that only supports webauthn for authentication. This can be used to bootstrap

Nov 6, 2022
It is a JWT based implement of identity server.

JWTAuth 安裝說明 基本需求 安裝 docker 服務 安裝 OpenSSL 安裝指令 建立 OS 系統的 jwtauth 帳號 sudo useradd -m jwtauth 給予 JWTAuth 帳號可以操作 docker 的權限 sudo usermod -aG docker jwtau

Aug 10, 2022
This repository contains a set of tools to help you implement IndieAuth, both server and client, in Go.

This repository contains a set of tools to help you implement IndieAuth, both server and client, in Go.

Nov 26, 2022
Server bridging Google's OAuth and service using Radius for authentication

Fringe Fringe is an easy workaround for Google Workplace users who need a Radius server to perform authentication on behalf of other services (e.g. 80

Mar 7, 2022
Simple Go/Chi powered http server meant for ad hoc use such as exposing a file system for testing HTML.

httphere httphere is a simple Go/Chi powered http server for ad hoc use such as testing HTML or temporarily exposing a local file system at the curren

Dec 10, 2021
A library for Go client applications that need to perform OAuth authorization against a server
A library for Go client applications that need to perform OAuth authorization against a server

oauth-0.8.0.zip oauth A library for Go client applications that need to perform OAuth authorization against a server, typically GitHub.com. Traditiona

Oct 13, 2021
Example of a simple application which is powered by a third-party oAuth 2.0 server for it's authentication / authorization. Written in Golang.

go mod init github.com/bartmika/osin-thirdparty-example go get github.com/spf13/cobra go get github.com/openshift/osin go get github.com/openshift/osi

Jan 4, 2022
Go based HTTP server with 2FA based on OTP (One-Time Password) manager like Google Authenticator

Go based HTTP server with 2FA based on OTP (One-Time Password) manager like Goog

Aug 21, 2022
Authelia: an open-source authentication and authorization server providing two-factor authentication
Authelia: an open-source authentication and authorization server providing two-factor authentication

Authelia is an open-source authentication and authorization server providing two

Jan 5, 2022
Golang OAuth2.0 server

Golang OAuth2.0 server

Aug 24, 2022
Dbt-postgres-proxy - Proxy server which intercepts and compiles dbt queries on the fly
Dbt-postgres-proxy - Proxy server which intercepts and compiles dbt queries on the fly

dbt-postgres-proxy A reverse proxy for postgres which compiles queries in flight

Mar 4, 2022
The forward-auth server for API keys authorization
The forward-auth server for API keys authorization

Token-login The authorization system based on tokens. Token-login is a server that functions as a forward auth server and provides an authorization fl

May 6, 2023