Code Monkey home page Code Monkey logo

itsme-packages's Introduction

ITSME Packages

Appveyor Build status

Prerequisites

To start using this, make sure to add this repository to your GOPATH, more information on that can be found here.

Project structure

To share the core ITSME OIDC logic to the multitude of generated packages, we use Go to create the logic, then create a shared C library which is the used to create binding with in all different languages out there. The core is kept shared and we expose a native, familiar interface per language. The goal is that the consumer of a language specifc package does not need to care or see that there's a different engine under the hood, as far as they know, it's all native. We can compile for different platforms as well so there's no need for any additional libraries to use this.

The project is created this way:

  • itsme-golang -> dependency of the clang itsme.go file
  • itsme.go exposes itsme-golang functionality by creating C style functions using cgo
  • itsme.go is built as a shared library for Unix (itsme_lib.so) and Windows (itsme_lib.dll)
  • The created shared libraries are used in the language specific projects where the C library is exposed using a native bridge which is specific per language

Developing

As each binding package is created in the language it is used for, the specific details per package can be found in those folder's README.md. Scripts to run this on Windows (using PowerShell) and Unix (using plain bash scripts) are available in the project repositories. Be advised that for the packages to be created, you need to be able to build the C library for both Windows and Unix. A CI system will be made available to facilitate this going forward.

Creating a package binding

To make sure you are compatible with the underlying structure, the bindings need to expose objects which can be marchalled into json which can then in turn be marchalled back to objects by the Golang C bridge. This is done to keep the interface as simple and as performant as possible.

The objects needed are the ones used in the exposed function code in our Go library:

type ItsmeSettings struct {
	ClientID             string `json:"client_id"`
	RedirectURI          string `json:"redirect_uri"`
	SigningCertificateID string `json:"signing_certificate_id"`
	SigningCert          string `json:"signing_cert"`
	EncryptionCert       string `json:"encryption_cert"`
}

//URLConfiguration defines the config needed to construct the OIDC url
type URLConfiguration struct {
	Scopes      []string `json:"scopes"`
	ServiceCode string   `json:"service_code"`
	RequestURI  string   `json:"request_uri"`
}

Have a look at one of the current bindings to see how this works.

Authors

itsme-packages's People

Contributors

jandedobbeleer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.