File tree Expand file tree Collapse file tree 2 files changed +2
-32
lines changed Expand file tree Collapse file tree 2 files changed +2
-32
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,14 @@ go 1.23
4
4
5
5
toolchain go1.24.2
6
6
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
11
8
12
9
require (
13
10
github.com/beevik/etree v1.5.0 // indirect
14
11
github.com/jonboulle/clockwork v0.2.2 // indirect
15
12
github.com/mattermost/xml-roundtrip-validator v0.1.0 // indirect
16
13
github.com/russellhaering/goxmldsig v1.4.0 // indirect
14
+ golang.org/x/crypto v0.33.0 // indirect
17
15
)
18
16
19
17
// Replace the remote saml module with your local version
Original file line number Diff line number Diff line change 8
8
"net/http"
9
9
"net/url"
10
10
11
- "golang.org/x/crypto/bcrypt"
12
-
13
11
"github.com/crewjam/saml/logger"
14
12
"github.com/crewjam/saml/samlidp"
15
13
)
@@ -47,31 +45,5 @@ func main() {
47
45
logr .Fatalf ("%s" , err )
48
46
}
49
47
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
-
76
48
http .ListenAndServe (":8080" , idpServer )
77
49
}
You can’t perform that action at this time.
0 commit comments