-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparams.go
50 lines (41 loc) · 1.08 KB
/
params.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package ciba
import (
"net/url"
"strconv"
)
type AuthenticationParam func(values url.Values)
func LoginHint(loginHint string) AuthenticationParam {
return func(values url.Values) {
values.Set("login_hint", loginHint)
}
}
func LoginHintToken(loginHintToken string) AuthenticationParam {
return func(values url.Values) {
values.Set("login_hint_token", loginHintToken)
}
}
func IDTokenHint(idTokenHint string) AuthenticationParam {
return func(values url.Values) {
values.Set("id_token_hint", idTokenHint)
}
}
func BindingMessage(bindingMessage string) AuthenticationParam {
return func(values url.Values) {
values.Set("binding_message", bindingMessage)
}
}
func ACRValues(acrValues string) AuthenticationParam {
return func(values url.Values) {
values.Set("acr_values", acrValues)
}
}
func UserCode(userCode string) AuthenticationParam {
return func(values url.Values) {
values.Set("user_code", userCode)
}
}
func RequestedExpiry(requestedExpiry int) AuthenticationParam {
return func(values url.Values) {
values.Set("requested_expiry", strconv.Itoa(requestedExpiry))
}
}