oc-auth/infrastructure/infrastructure.go
2024-10-30 12:38:25 +01:00

29 lines
768 B
Go

package infrastructure
import (
"oc-auth/conf"
auth_connectors "oc-auth/infrastructure/auth_connector"
"oc-auth/infrastructure/claims"
"oc-auth/infrastructure/perms_connectors"
"cloud.o-forge.io/core/oc-lib/tools"
)
var a = map[string]auth_connectors.AuthConnector{
"hydra": auth_connectors.HydraConnector{
Caller: tools.NewHTTPCaller(map[tools.DataType]map[tools.METHOD]string{}),
State: "12345678", ResponseType: "token", Scopes: "openid profile email roles"}, // base url
}
func GetAuthConnector() auth_connectors.AuthConnector {
return a[conf.GetConfig().Auth]
}
func GetPermissionConnector() perms_connectors.PermConnector {
return perms_connectors.GetPermissionConnector()
}
func GetClaims() claims.ClaimService {
return claims.GetClaims()
}