File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,16 +4,14 @@ go 1.23
44
55toolchain go1.24.2
66
7- require (
8- github.com/crewjam/saml v0.5.1
9- golang.org/x/crypto v0.33.0
10- )
7+ require github.com/crewjam/saml v0.5.1
118
129require (
1310 github.com/beevik/etree v1.5.0 // indirect
1411 github.com/jonboulle/clockwork v0.2.2 // indirect
1512 github.com/mattermost/xml-roundtrip-validator v0.1.0 // indirect
1613 github.com/russellhaering/goxmldsig v1.4.0 // indirect
14+ golang.org/x/crypto v0.33.0 // indirect
1715)
1816
1917// Replace the remote saml module with your local version
Original file line number Diff line number Diff line change 88 "net/http"
99 "net/url"
1010
11- "golang.org/x/crypto/bcrypt"
12-
1311 "github.com/crewjam/saml/logger"
1412 "github.com/crewjam/saml/samlidp"
1513)
@@ -47,31 +45,5 @@ func main() {
4745 logr .Fatalf ("%s" , err )
4846 }
4947
50- hashedPassword , _ := bcrypt .GenerateFromPassword ([]byte ("hunter2" ), bcrypt .DefaultCost )
51- err = idpServer .Store .Put ("/users/alice" , samlidp.User {Name : "alice" ,
52- HashedPassword : hashedPassword ,
53- Groups : []string {"Administrators" , "Users" },
54- Email : "alice@example.com" ,
55- CommonName : "Alice Smith" ,
56- Surname : "Smith" ,
57- GivenName : "Alice" ,
58- })
59- if err != nil {
60- logr .Fatalf ("%s" , err )
61- }
62-
63- err = idpServer .Store .Put ("/users/bob" , samlidp.User {
64- Name : "bob" ,
65- HashedPassword : hashedPassword ,
66- Groups : []string {"Users" },
67- Email : "bob@example.com" ,
68- CommonName : "Bob Smith" ,
69- Surname : "Smith" ,
70- GivenName : "Bob" ,
71- })
72- if err != nil {
73- logr .Fatalf ("%s" , err )
74- }
75-
7648 http .ListenAndServe (":8080" , idpServer )
7749}
You can’t perform that action at this time.
0 commit comments