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
use octocrate_core::*;
#[allow(unused_imports)]
use octocrate_types::*;
/// Endpoints to manage GitHub OIDC configuration using the REST API.
pub struct GitHubOidcAPI {
config: SharedAPIConfig,
}
impl GitHubOidcAPI {
pub fn new(config: &SharedAPIConfig) -> Self {
Self {
config: config.clone(),
}
}
/// **Get the customization template for an OIDC subject claim for an organization**
///
/// Gets the customization template for an OpenID Connect (OIDC) subject claim.
///
/// OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.
///
/// *Documentation*: [https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization](https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization)
pub fn get_oidc_custom_sub_template_for_org(
&self,
org: impl Into<String>,
) -> Request<(), (), OidcCustomSub> {
let org = org.into();
let url = format!("/orgs/{org}/actions/oidc/customization/sub");
Request::<(), (), OidcCustomSub>::builder(&self.config)
.get(url)
.build()
}
/// **Set the customization template for an OIDC subject claim for an organization**
///
/// Creates or updates the customization template for an OpenID Connect (OIDC) subject claim.
///
/// OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.
///
/// *Documentation*: [https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization](https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization)
pub fn update_oidc_custom_sub_template_for_org(
&self,
org: impl Into<String>,
) -> Request<OidcCustomSub, (), EmptyObject> {
let org = org.into();
let url = format!("/orgs/{org}/actions/oidc/customization/sub");
Request::<OidcCustomSub, (), EmptyObject>::builder(&self.config)
.put(url)
.build()
}
}