/
getOidc.go
233 lines (201 loc) · 8.42 KB
/
getOidc.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package idp
import (
"context"
"reflect"
"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to retrieve a OIDC IdP from Okta.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-okta/sdk/v4/go/okta/idp"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := idp.LookupOidc(ctx, &idp.LookupOidcArgs{
// Name: pulumi.StringRef("Example Provider"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func LookupOidc(ctx *pulumi.Context, args *LookupOidcArgs, opts ...pulumi.InvokeOption) (*LookupOidcResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupOidcResult
err := ctx.Invoke("okta:idp/getOidc:getOidc", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getOidc.
type LookupOidcArgs struct {
// The id of the idp to retrieve, conflicts with `name`.
Id *string `pulumi:"id"`
// The name of the idp to retrieve, conflicts with `id`.
Name *string `pulumi:"name"`
}
// A collection of values returned by getOidc.
type LookupOidcResult struct {
// The method of making an authorization request.
AuthorizationBinding string `pulumi:"authorizationBinding"`
// IdP Authorization Server (AS) endpoint to request consent from the user and obtain an authorization code grant.
AuthorizationUrl string `pulumi:"authorizationUrl"`
// Unique identifier issued by AS for the Okta IdP instance.
ClientId string `pulumi:"clientId"`
// Client secret issued by AS for the Okta IdP instance.
ClientSecret string `pulumi:"clientSecret"`
// id of idp.
Id *string `pulumi:"id"`
// Indicates whether Okta uses the original Okta org domain URL, a custom domain URL, or dynamic.
IssuerMode string `pulumi:"issuerMode"`
// URI that identifies the issuer.
IssuerUrl string `pulumi:"issuerUrl"`
// The method of making a request for the OIDC JWKS.
JwksBinding string `pulumi:"jwksBinding"`
// Endpoint where the keys signer publishes its keys in a JWK Set.
JwksUrl string `pulumi:"jwksUrl"`
// Maximum allowable clock-skew when processing messages from the IdP.
MaxClockSkew int `pulumi:"maxClockSkew"`
// name of the idp.
Name *string `pulumi:"name"`
// The type of protocol to use.
ProtocolType string `pulumi:"protocolType"`
// The scopes of the IdP.
Scopes []string `pulumi:"scopes"`
// The method of making a token request.
TokenBinding string `pulumi:"tokenBinding"`
// IdP Authorization Server (AS) endpoint to exchange the authorization code grant for an access token.
TokenUrl string `pulumi:"tokenUrl"`
// type of idp.
Type string `pulumi:"type"`
// The method of making a user info request.
UserInfoBinding string `pulumi:"userInfoBinding"`
// Protected resource endpoint that returns claims about the authenticated user.
UserInfoUrl string `pulumi:"userInfoUrl"`
}
func LookupOidcOutput(ctx *pulumi.Context, args LookupOidcOutputArgs, opts ...pulumi.InvokeOption) LookupOidcResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupOidcResult, error) {
args := v.(LookupOidcArgs)
r, err := LookupOidc(ctx, &args, opts...)
var s LookupOidcResult
if r != nil {
s = *r
}
return s, err
}).(LookupOidcResultOutput)
}
// A collection of arguments for invoking getOidc.
type LookupOidcOutputArgs struct {
// The id of the idp to retrieve, conflicts with `name`.
Id pulumi.StringPtrInput `pulumi:"id"`
// The name of the idp to retrieve, conflicts with `id`.
Name pulumi.StringPtrInput `pulumi:"name"`
}
func (LookupOidcOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupOidcArgs)(nil)).Elem()
}
// A collection of values returned by getOidc.
type LookupOidcResultOutput struct{ *pulumi.OutputState }
func (LookupOidcResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupOidcResult)(nil)).Elem()
}
func (o LookupOidcResultOutput) ToLookupOidcResultOutput() LookupOidcResultOutput {
return o
}
func (o LookupOidcResultOutput) ToLookupOidcResultOutputWithContext(ctx context.Context) LookupOidcResultOutput {
return o
}
// The method of making an authorization request.
func (o LookupOidcResultOutput) AuthorizationBinding() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.AuthorizationBinding }).(pulumi.StringOutput)
}
// IdP Authorization Server (AS) endpoint to request consent from the user and obtain an authorization code grant.
func (o LookupOidcResultOutput) AuthorizationUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.AuthorizationUrl }).(pulumi.StringOutput)
}
// Unique identifier issued by AS for the Okta IdP instance.
func (o LookupOidcResultOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.ClientId }).(pulumi.StringOutput)
}
// Client secret issued by AS for the Okta IdP instance.
func (o LookupOidcResultOutput) ClientSecret() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.ClientSecret }).(pulumi.StringOutput)
}
// id of idp.
func (o LookupOidcResultOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupOidcResult) *string { return v.Id }).(pulumi.StringPtrOutput)
}
// Indicates whether Okta uses the original Okta org domain URL, a custom domain URL, or dynamic.
func (o LookupOidcResultOutput) IssuerMode() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.IssuerMode }).(pulumi.StringOutput)
}
// URI that identifies the issuer.
func (o LookupOidcResultOutput) IssuerUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.IssuerUrl }).(pulumi.StringOutput)
}
// The method of making a request for the OIDC JWKS.
func (o LookupOidcResultOutput) JwksBinding() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.JwksBinding }).(pulumi.StringOutput)
}
// Endpoint where the keys signer publishes its keys in a JWK Set.
func (o LookupOidcResultOutput) JwksUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.JwksUrl }).(pulumi.StringOutput)
}
// Maximum allowable clock-skew when processing messages from the IdP.
func (o LookupOidcResultOutput) MaxClockSkew() pulumi.IntOutput {
return o.ApplyT(func(v LookupOidcResult) int { return v.MaxClockSkew }).(pulumi.IntOutput)
}
// name of the idp.
func (o LookupOidcResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupOidcResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// The type of protocol to use.
func (o LookupOidcResultOutput) ProtocolType() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.ProtocolType }).(pulumi.StringOutput)
}
// The scopes of the IdP.
func (o LookupOidcResultOutput) Scopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupOidcResult) []string { return v.Scopes }).(pulumi.StringArrayOutput)
}
// The method of making a token request.
func (o LookupOidcResultOutput) TokenBinding() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.TokenBinding }).(pulumi.StringOutput)
}
// IdP Authorization Server (AS) endpoint to exchange the authorization code grant for an access token.
func (o LookupOidcResultOutput) TokenUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.TokenUrl }).(pulumi.StringOutput)
}
// type of idp.
func (o LookupOidcResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.Type }).(pulumi.StringOutput)
}
// The method of making a user info request.
func (o LookupOidcResultOutput) UserInfoBinding() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.UserInfoBinding }).(pulumi.StringOutput)
}
// Protected resource endpoint that returns claims about the authenticated user.
func (o LookupOidcResultOutput) UserInfoUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupOidcResult) string { return v.UserInfoUrl }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupOidcResultOutput{})
}