charon service grpc client library
Project description
# Charon [](https://travis-ci.org/piotrkowalczuk/charon)
[](http://godoc.org/github.com/piotrkowalczuk/charon)
[](https://hub.docker.com/r/piotrkowalczuk/charon/)
[](https://codecov.io/github/piotrkowalczuk/charon?branch=master)
[](https://codeclimate.com/github/piotrkowalczuk/charon)
[](https://goreportcard.com/report/github.com/piotrkowalczuk/charon)
[](https://pypi.python.org/pypi/charon-client)
<img src="/data/logo/charon.png?raw=true" width="300">
## Quick Start
### Installation
```bash
$ go install github.com/piotrkowalczuk/charon/cmd/charond
$ go install github.com/piotrkowalczuk/charon/cmd/charonctl
```
### Superuser
```bash
$ charonctl register -address=localhost:8080 -auth.disabled -register.superuser=true -register.username="j.snow@gmail.com" -register.password=123 -register.firstname=John -register.lastname=Snow
```
## Example
### Python
```python
from charonrpc import auth_pb2, auth_pb2_grpc
import grpc
charonChannel = grpc.insecure_channel('ADDRESS')
auth = auth_pb2_grpc.AuthStub(charonChannel)
try:
res = auth.Login(auth_pb2.LoginRequest(
username="USERNAME",
password="PASSWORD",
))
print "access token: %s" % res.value
except grpc.RpcError as e:
if e.code() == grpc.StatusCode.UNAUTHENTICATED:
print "login failure, username and/or password do not match"
else:
print "grpc error: %s" % e
except Exception as e:
print "unexpected error: %s" % e
```
## Contribution
@TODO
### Documentation
@TODO
### TODO
- [x] Auth
- [x] login
- [x] logout
- [x] is authenticated
- [x] subject
- [x] is granted
- [x] belongs to
- [x] Permission
- [x] get
- [x] list
- [x] register
- [x] Group
- [x] get
- [x] list
- [x] modify
- [x] delete
- [x] create
- [x] set permissions
- [x] list permissions
- [x] User
- [x] get
- [x] list
- [x] modify
- [x] delete
- [x] create
- [x] set permissions
- [x] set groups
- [x] list permissions
- [x] list groups
[](http://godoc.org/github.com/piotrkowalczuk/charon)
[](https://hub.docker.com/r/piotrkowalczuk/charon/)
[](https://codecov.io/github/piotrkowalczuk/charon?branch=master)
[](https://codeclimate.com/github/piotrkowalczuk/charon)
[](https://goreportcard.com/report/github.com/piotrkowalczuk/charon)
[](https://pypi.python.org/pypi/charon-client)
<img src="/data/logo/charon.png?raw=true" width="300">
## Quick Start
### Installation
```bash
$ go install github.com/piotrkowalczuk/charon/cmd/charond
$ go install github.com/piotrkowalczuk/charon/cmd/charonctl
```
### Superuser
```bash
$ charonctl register -address=localhost:8080 -auth.disabled -register.superuser=true -register.username="j.snow@gmail.com" -register.password=123 -register.firstname=John -register.lastname=Snow
```
## Example
### Python
```python
from charonrpc import auth_pb2, auth_pb2_grpc
import grpc
charonChannel = grpc.insecure_channel('ADDRESS')
auth = auth_pb2_grpc.AuthStub(charonChannel)
try:
res = auth.Login(auth_pb2.LoginRequest(
username="USERNAME",
password="PASSWORD",
))
print "access token: %s" % res.value
except grpc.RpcError as e:
if e.code() == grpc.StatusCode.UNAUTHENTICATED:
print "login failure, username and/or password do not match"
else:
print "grpc error: %s" % e
except Exception as e:
print "unexpected error: %s" % e
```
## Contribution
@TODO
### Documentation
@TODO
### TODO
- [x] Auth
- [x] login
- [x] logout
- [x] is authenticated
- [x] subject
- [x] is granted
- [x] belongs to
- [x] Permission
- [x] get
- [x] list
- [x] register
- [x] Group
- [x] get
- [x] list
- [x] modify
- [x] delete
- [x] create
- [x] set permissions
- [x] list permissions
- [x] User
- [x] get
- [x] list
- [x] modify
- [x] delete
- [x] create
- [x] set permissions
- [x] set groups
- [x] list permissions
- [x] list groups
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
charon-client-0.11.1.tar.gz
(19.1 kB
view details)
File details
Details for the file charon-client-0.11.1.tar.gz.
File metadata
- Download URL: charon-client-0.11.1.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b52b1936276f348b8bf9dab340009ee959e84f6967ead7b828b1ee3ec9ff023c
|
|
| MD5 |
5434df52f038c82c92b401d445b5895b
|
|
| BLAKE2b-256 |
6d2cb1594cc738555a8f5b5b20c4f5955c8b4fac0914534fa30f18e56beacea1
|