Skip to content

Commit

Permalink
Merge 0b9a360 into 7f1c376
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Goslar committed May 21, 2019
2 parents 7f1c376 + 0b9a360 commit 99a5a90
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ and can answer access requests that look like:
```

However, Ladon does not come with a HTTP or server implementation. It does not restrict JSON either. We believe that it is your job to decide
if you want to use Protobuf, RESTful, HTTP, AMQP, or some other protocol. It's up to you to write server!
if you want to use Protobuf, RESTful, HTTP, AMQP, or some other protocol. It's up to you to write the server!

The following example should give you an idea what a RESTful flow *could* look like. Initially we create a policy by
POSTing it to an artificial HTTP endpoint:
Expand Down Expand Up @@ -631,14 +631,15 @@ import "github.com/ory/ladon"
func main() {
// ...

if err := warden.IsAllowed(&ladon.Request{
err := warden.IsAllowed(&ladon.Request{
Subject: "peter",
Action: "delete",
Resource: "myrn:some.domain.com:resource:123",
Context: ladon.Context{
"ip": "127.0.0.1",
},
}); err != nil {
})
if err != nil {
log.Fatal("Access denied")
}

Expand Down

0 comments on commit 99a5a90

Please sign in to comment.