-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
32 lines (24 loc) · 942 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"log"
"os"
"github.com/arturoeanton/goscim/scim"
"github.com/gin-gonic/gin"
)
func main() {
scim.InitDB()
log.Println("GoScim v0.1")
folderConfig := "config"
port := os.Getenv("SCIM_PORT")
if port == "" {
port = ":8080"
}
r := gin.Default()
r.SetTrustedProxies([]string{"127.0.0.1"})
scim.ReadResourceType(folderConfig, r)
//r.POST(scim.PREFIX+"/Bulk", operations.Bulk) // Bulk: POST https://example.com/{v}/Bulk
r.GET("/ServiceProviderConfig", scim.DiscoveryServiceProviderConfig) // GET /ServiceProviderConfig -> Specification compliance, authentication schemes, data models.
r.GET("/ResourceTypes", scim.DiscoveryResourceTypes) // GET /ResourceTypes -> An endpoint used to discover the types of resources available.
r.GET("/Schemas", scim.DiscoverySchemas) // GET /Schemas -> Introspect resources and attribute extensions.
r.Run(port)
}