Add secure, flexible authorization to your application in minutes.
Get Started1import "github.com/warrant-dev/warrant-go"2
3client := warrant.NewClient(warrant.ClientConfig{4 ApiKey: "<your_api_key>",5})6
7isAuthorized, err := client.IsAuthorized(warrant.Warrant{8 ObjectType: "store",9 ObjectId: "91",10 Relation: "edit",11 User: warrant.WarrantUser{12 UserId: "56",13 },14})15
16if isAuthorized {17 // Carry out authorized logic18}
Track new and returning users in Warrant to manage their access rules via the Warrant dashboard.
Object types are a high level definition of your application data and how it relates to users.
Warrants are access control rules you can apply to users and/or groups of users.
Easily add access checks to your app across the tech stack with an SDK available in most popular languages.
Add access checks to your client application to show/hide parts of your UI for different users.
1import "github.com/warrant-dev/warrant-go"2
3func signUp() error {4 user, err := yourUserCreationLogic()5 if err != nil {6 return err7 }8
9 client := warrant.NewClient(warrant.ClientConfig{10 ApiKey: <your_api_key>,11 })12
13 _, err := client.CreateUser(warrant.User{14 UserId: "userId",15 })16 if err != nil {17 return err18 }19}