Documentation
¶
Index ¶
- func CreateAuthorizationsPostRequestBodyFromDiscriminatorValue(...) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, ...)
- func CreateClientsItemItemWithFingerprintPutRequestBodyFromDiscriminatorValue(...) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, ...)
- func CreateClientsItemWithClient_PutRequestBodyFromDiscriminatorValue(...) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, ...)
- func CreateItemWithAuthorization_PatchRequestBodyFromDiscriminatorValue(...) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, ...)
- type AuthorizationsPostRequestBody
- func (m *AuthorizationsPostRequestBody) GetAdditionalData() map[string]any
- func (m *AuthorizationsPostRequestBody) GetClientId() *string
- func (m *AuthorizationsPostRequestBody) GetClientSecret() *string
- func (m *AuthorizationsPostRequestBody) GetFieldDeserializers() ...
- func (m *AuthorizationsPostRequestBody) GetFingerprint() *string
- func (m *AuthorizationsPostRequestBody) GetNote() *string
- func (m *AuthorizationsPostRequestBody) GetNoteUrl() *string
- func (m *AuthorizationsPostRequestBody) GetScopes() []string
- func (m *AuthorizationsPostRequestBody) Serialize(...) error
- func (m *AuthorizationsPostRequestBody) SetAdditionalData(value map[string]any)
- func (m *AuthorizationsPostRequestBody) SetClientId(value *string)
- func (m *AuthorizationsPostRequestBody) SetClientSecret(value *string)
- func (m *AuthorizationsPostRequestBody) SetFingerprint(value *string)
- func (m *AuthorizationsPostRequestBody) SetNote(value *string)
- func (m *AuthorizationsPostRequestBody) SetNoteUrl(value *string)
- func (m *AuthorizationsPostRequestBody) SetScopes(value []string)
- type AuthorizationsPostRequestBodyable
- type AuthorizationsRequestBuilder
- func (m *AuthorizationsRequestBuilder) ByAuthorization_id(authorization_id int32) *WithAuthorization_ItemRequestBuilder
- func (m *AuthorizationsRequestBuilder) Clients() *ClientsRequestBuilder
- func (m *AuthorizationsRequestBuilder) Get(ctx context.Context, ...) (...)
- func (m *AuthorizationsRequestBuilder) Post(ctx context.Context, body AuthorizationsPostRequestBodyable, ...) (...)
- func (m *AuthorizationsRequestBuilder) ToGetRequestInformation(ctx context.Context, ...) (...)
- func (m *AuthorizationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body AuthorizationsPostRequestBodyable, ...) (...)
- func (m *AuthorizationsRequestBuilder) WithUrl(rawUrl string) *AuthorizationsRequestBuilder
- type AuthorizationsRequestBuilderGetQueryParameters
- type ClientsItemItemWithFingerprintPutRequestBody
- func (m *ClientsItemItemWithFingerprintPutRequestBody) GetAdditionalData() map[string]any
- func (m *ClientsItemItemWithFingerprintPutRequestBody) GetClientSecret() *string
- func (m *ClientsItemItemWithFingerprintPutRequestBody) GetFieldDeserializers() ...
- func (m *ClientsItemItemWithFingerprintPutRequestBody) GetNote() *string
- func (m *ClientsItemItemWithFingerprintPutRequestBody) GetNoteUrl() *string
- func (m *ClientsItemItemWithFingerprintPutRequestBody) GetScopes() []string
- func (m *ClientsItemItemWithFingerprintPutRequestBody) Serialize(...) error
- func (m *ClientsItemItemWithFingerprintPutRequestBody) SetAdditionalData(value map[string]any)
- func (m *ClientsItemItemWithFingerprintPutRequestBody) SetClientSecret(value *string)
- func (m *ClientsItemItemWithFingerprintPutRequestBody) SetNote(value *string)
- func (m *ClientsItemItemWithFingerprintPutRequestBody) SetNoteUrl(value *string)
- func (m *ClientsItemItemWithFingerprintPutRequestBody) SetScopes(value []string)
- type ClientsItemItemWithFingerprintPutRequestBodyable
- type ClientsItemWithClient_PutRequestBody
- func (m *ClientsItemWithClient_PutRequestBody) GetAdditionalData() map[string]any
- func (m *ClientsItemWithClient_PutRequestBody) GetClientSecret() *string
- func (m *ClientsItemWithClient_PutRequestBody) GetFieldDeserializers() ...
- func (m *ClientsItemWithClient_PutRequestBody) GetFingerprint() *string
- func (m *ClientsItemWithClient_PutRequestBody) GetNote() *string
- func (m *ClientsItemWithClient_PutRequestBody) GetNoteUrl() *string
- func (m *ClientsItemWithClient_PutRequestBody) GetScopes() []string
- func (m *ClientsItemWithClient_PutRequestBody) Serialize(...) error
- func (m *ClientsItemWithClient_PutRequestBody) SetAdditionalData(value map[string]any)
- func (m *ClientsItemWithClient_PutRequestBody) SetClientSecret(value *string)
- func (m *ClientsItemWithClient_PutRequestBody) SetFingerprint(value *string)
- func (m *ClientsItemWithClient_PutRequestBody) SetNote(value *string)
- func (m *ClientsItemWithClient_PutRequestBody) SetNoteUrl(value *string)
- func (m *ClientsItemWithClient_PutRequestBody) SetScopes(value []string)
- type ClientsItemWithClient_PutRequestBodyable
- type ClientsItemWithFingerprintItemRequestBuilder
- func (m *ClientsItemWithFingerprintItemRequestBuilder) Put(ctx context.Context, body ClientsItemItemWithFingerprintPutRequestBodyable, ...) (...)
- func (m *ClientsItemWithFingerprintItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ClientsItemItemWithFingerprintPutRequestBodyable, ...) (...)
- func (m *ClientsItemWithFingerprintItemRequestBuilder) WithUrl(rawUrl string) *ClientsItemWithFingerprintItemRequestBuilder
- type ClientsRequestBuilder
- type ClientsWithClient_ItemRequestBuilder
- func (m *ClientsWithClient_ItemRequestBuilder) ByFingerprint(fingerprint string) *ClientsItemWithFingerprintItemRequestBuilder
- func (m *ClientsWithClient_ItemRequestBuilder) Put(ctx context.Context, body ClientsItemWithClient_PutRequestBodyable, ...) (...)
- func (m *ClientsWithClient_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ClientsItemWithClient_PutRequestBodyable, ...) (...)
- func (m *ClientsWithClient_ItemRequestBuilder) WithUrl(rawUrl string) *ClientsWithClient_ItemRequestBuilder
- type ItemWithAuthorization_PatchRequestBody
- func (m *ItemWithAuthorization_PatchRequestBody) GetAddScopes() []string
- func (m *ItemWithAuthorization_PatchRequestBody) GetAdditionalData() map[string]any
- func (m *ItemWithAuthorization_PatchRequestBody) GetFieldDeserializers() ...
- func (m *ItemWithAuthorization_PatchRequestBody) GetFingerprint() *string
- func (m *ItemWithAuthorization_PatchRequestBody) GetNote() *string
- func (m *ItemWithAuthorization_PatchRequestBody) GetNoteUrl() *string
- func (m *ItemWithAuthorization_PatchRequestBody) GetRemoveScopes() []string
- func (m *ItemWithAuthorization_PatchRequestBody) GetScopes() []string
- func (m *ItemWithAuthorization_PatchRequestBody) Serialize(...) error
- func (m *ItemWithAuthorization_PatchRequestBody) SetAddScopes(value []string)
- func (m *ItemWithAuthorization_PatchRequestBody) SetAdditionalData(value map[string]any)
- func (m *ItemWithAuthorization_PatchRequestBody) SetFingerprint(value *string)
- func (m *ItemWithAuthorization_PatchRequestBody) SetNote(value *string)
- func (m *ItemWithAuthorization_PatchRequestBody) SetNoteUrl(value *string)
- func (m *ItemWithAuthorization_PatchRequestBody) SetRemoveScopes(value []string)
- func (m *ItemWithAuthorization_PatchRequestBody) SetScopes(value []string)
- type ItemWithAuthorization_PatchRequestBodyable
- type WithAuthorization_ItemRequestBuilder
- func (m *WithAuthorization_ItemRequestBuilder) Delete(ctx context.Context, ...) error
- func (m *WithAuthorization_ItemRequestBuilder) Get(ctx context.Context, ...) (...)
- func (m *WithAuthorization_ItemRequestBuilder) Patch(ctx context.Context, body ItemWithAuthorization_PatchRequestBodyable, ...) (...)
- func (m *WithAuthorization_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, ...) (...)
- func (m *WithAuthorization_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, ...) (...)
- func (m *WithAuthorization_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemWithAuthorization_PatchRequestBodyable, ...) (...)
- func (m *WithAuthorization_ItemRequestBuilder) WithUrl(rawUrl string) *WithAuthorization_ItemRequestBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAuthorizationsPostRequestBodyFromDiscriminatorValue ¶
func CreateAuthorizationsPostRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error)
CreateAuthorizationsPostRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value returns a Parsable when successful
func CreateClientsItemItemWithFingerprintPutRequestBodyFromDiscriminatorValue ¶
func CreateClientsItemItemWithFingerprintPutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error)
CreateClientsItemItemWithFingerprintPutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value returns a Parsable when successful
func CreateClientsItemWithClient_PutRequestBodyFromDiscriminatorValue ¶
func CreateClientsItemWithClient_PutRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error)
CreateClientsItemWithClient_PutRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value returns a Parsable when successful
func CreateItemWithAuthorization_PatchRequestBodyFromDiscriminatorValue ¶
func CreateItemWithAuthorization_PatchRequestBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) (i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error)
CreateItemWithAuthorization_PatchRequestBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value returns a Parsable when successful
Types ¶
type AuthorizationsPostRequestBody ¶
type AuthorizationsPostRequestBody struct {
// contains filtered or unexported fields
}
func NewAuthorizationsPostRequestBody ¶
func NewAuthorizationsPostRequestBody() *AuthorizationsPostRequestBody
NewAuthorizationsPostRequestBody instantiates a new AuthorizationsPostRequestBody and sets the default values.
func (*AuthorizationsPostRequestBody) GetAdditionalData ¶
func (m *AuthorizationsPostRequestBody) GetAdditionalData() map[string]any
GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. returns a map[string]any when successful
func (*AuthorizationsPostRequestBody) GetClientId ¶
func (m *AuthorizationsPostRequestBody) GetClientId() *string
GetClientId gets the client_id property value. The OAuth app client key for which to create the token. returns a *string when successful
func (*AuthorizationsPostRequestBody) GetClientSecret ¶
func (m *AuthorizationsPostRequestBody) GetClientSecret() *string
GetClientSecret gets the client_secret property value. The OAuth app client secret for which to create the token. returns a *string when successful
func (*AuthorizationsPostRequestBody) GetFieldDeserializers ¶
func (m *AuthorizationsPostRequestBody) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error
GetFieldDeserializers the deserialization information for the current model returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (*AuthorizationsPostRequestBody) GetFingerprint ¶
func (m *AuthorizationsPostRequestBody) GetFingerprint() *string
GetFingerprint gets the fingerprint property value. A unique string to distinguish an authorization from others created for the same client ID and user. returns a *string when successful
func (*AuthorizationsPostRequestBody) GetNote ¶
func (m *AuthorizationsPostRequestBody) GetNote() *string
GetNote gets the note property value. A note to remind you what the OAuth token is for. returns a *string when successful
func (*AuthorizationsPostRequestBody) GetNoteUrl ¶
func (m *AuthorizationsPostRequestBody) GetNoteUrl() *string
GetNoteUrl gets the note_url property value. A URL to remind you what app the OAuth token is for. returns a *string when successful
func (*AuthorizationsPostRequestBody) GetScopes ¶
func (m *AuthorizationsPostRequestBody) GetScopes() []string
GetScopes gets the scopes property value. A list of scopes that this authorization is in. returns a []string when successful
func (*AuthorizationsPostRequestBody) Serialize ¶
func (m *AuthorizationsPostRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error
Serialize serializes information the current object
func (*AuthorizationsPostRequestBody) SetAdditionalData ¶
func (m *AuthorizationsPostRequestBody) SetAdditionalData(value map[string]any)
SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (*AuthorizationsPostRequestBody) SetClientId ¶
func (m *AuthorizationsPostRequestBody) SetClientId(value *string)
SetClientId sets the client_id property value. The OAuth app client key for which to create the token.
func (*AuthorizationsPostRequestBody) SetClientSecret ¶
func (m *AuthorizationsPostRequestBody) SetClientSecret(value *string)
SetClientSecret sets the client_secret property value. The OAuth app client secret for which to create the token.
func (*AuthorizationsPostRequestBody) SetFingerprint ¶
func (m *AuthorizationsPostRequestBody) SetFingerprint(value *string)
SetFingerprint sets the fingerprint property value. A unique string to distinguish an authorization from others created for the same client ID and user.
func (*AuthorizationsPostRequestBody) SetNote ¶
func (m *AuthorizationsPostRequestBody) SetNote(value *string)
SetNote sets the note property value. A note to remind you what the OAuth token is for.
func (*AuthorizationsPostRequestBody) SetNoteUrl ¶
func (m *AuthorizationsPostRequestBody) SetNoteUrl(value *string)
SetNoteUrl sets the note_url property value. A URL to remind you what app the OAuth token is for.
func (*AuthorizationsPostRequestBody) SetScopes ¶
func (m *AuthorizationsPostRequestBody) SetScopes(value []string)
SetScopes sets the scopes property value. A list of scopes that this authorization is in.
type AuthorizationsPostRequestBodyable ¶
type AuthorizationsPostRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetClientId() *string GetClientSecret() *string GetFingerprint() *string GetNote() *string GetNoteUrl() *string GetScopes() []string SetClientId(value *string) SetClientSecret(value *string) SetFingerprint(value *string) SetNote(value *string) SetNoteUrl(value *string) SetScopes(value []string) }
type AuthorizationsRequestBuilder ¶
type AuthorizationsRequestBuilder struct {
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder
}
AuthorizationsRequestBuilder builds and executes requests for operations under \authorizations
func NewAuthorizationsRequestBuilder ¶
func NewAuthorizationsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *AuthorizationsRequestBuilder
NewAuthorizationsRequestBuilder instantiates a new AuthorizationsRequestBuilder and sets the default values.
func NewAuthorizationsRequestBuilderInternal ¶
func NewAuthorizationsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *AuthorizationsRequestBuilder
NewAuthorizationsRequestBuilderInternal instantiates a new AuthorizationsRequestBuilder and sets the default values.
func (*AuthorizationsRequestBuilder) ByAuthorization_id ¶
func (m *AuthorizationsRequestBuilder) ByAuthorization_id(authorization_id int32) *WithAuthorization_ItemRequestBuilder
ByAuthorization_id gets an item from the github.com/octokit/go-sdk-enterprise-server/pkg/github.authorizations.item collection Deprecated: returns a *WithAuthorization_ItemRequestBuilder when successful
func (*AuthorizationsRequestBuilder) Clients ¶
func (m *AuthorizationsRequestBuilder) Clients() *ClientsRequestBuilder
Clients the clients property returns a *ClientsRequestBuilder when successful
func (*AuthorizationsRequestBuilder) Get ¶
func (m *AuthorizationsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[AuthorizationsRequestBuilderGetQueryParameters]) ([]ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.Authorizationable, error)
Get > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). Deprecated: returns a []Authorizationable when successful returns a BasicError error when the service returns a 401 status code returns a BasicError error when the service returns a 403 status code returns a BasicError error when the service returns a 404 status code API method documentation
func (*AuthorizationsRequestBuilder) Post ¶
func (m *AuthorizationsRequestBuilder) Post(ctx context.Context, body AuthorizationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.Authorizationable, error)
Post > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).> [!WARNING]> Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).Creates OAuth tokens using [Basic Authentication](https://docs.github.com/enterprise-server@3.12/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.12/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them.You can also create tokens on GitHub Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/enterprise-server@3.12/articles/creating-an-access-token-for-command-line-use).Organizations that enforce SAML SSO require personal access tokens to be allowed. For more information, see "[About identity and access management with SAML single sign-on](https://docs.github.com/enterprise-server@3.12/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)" in the GitHub Enterprise Cloud documentation. Deprecated: returns a Authorizationable when successful returns a BasicError error when the service returns a 401 status code returns a BasicError error when the service returns a 403 status code returns a BasicError error when the service returns a 410 status code returns a ValidationError error when the service returns a 422 status code API method documentation
func (*AuthorizationsRequestBuilder) ToGetRequestInformation ¶
func (m *AuthorizationsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[AuthorizationsRequestBuilderGetQueryParameters]) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error)
ToGetRequestInformation > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). Deprecated: returns a *RequestInformation when successful
func (*AuthorizationsRequestBuilder) ToPostRequestInformation ¶
func (m *AuthorizationsRequestBuilder) ToPostRequestInformation(ctx context.Context, body AuthorizationsPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error)
ToPostRequestInformation > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).> [!WARNING]> Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).Creates OAuth tokens using [Basic Authentication](https://docs.github.com/enterprise-server@3.12/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.12/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them.You can also create tokens on GitHub Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/enterprise-server@3.12/articles/creating-an-access-token-for-command-line-use).Organizations that enforce SAML SSO require personal access tokens to be allowed. For more information, see "[About identity and access management with SAML single sign-on](https://docs.github.com/enterprise-server@3.12/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)" in the GitHub Enterprise Cloud documentation. Deprecated: returns a *RequestInformation when successful
func (*AuthorizationsRequestBuilder) WithUrl ¶
func (m *AuthorizationsRequestBuilder) WithUrl(rawUrl string) *AuthorizationsRequestBuilder
WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. Deprecated: returns a *AuthorizationsRequestBuilder when successful
type AuthorizationsRequestBuilderGetQueryParameters ¶
type AuthorizationsRequestBuilderGetQueryParameters struct { // The client ID of your GitHub app. Client_id *string `uriparametername:"client_id"` // The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.12/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Page *int32 `uriparametername:"page"` // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.12/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Per_page *int32 `uriparametername:"per_page"` }
AuthorizationsRequestBuilderGetQueryParameters > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
type ClientsItemItemWithFingerprintPutRequestBody ¶
type ClientsItemItemWithFingerprintPutRequestBody struct {
// contains filtered or unexported fields
}
func NewClientsItemItemWithFingerprintPutRequestBody ¶
func NewClientsItemItemWithFingerprintPutRequestBody() *ClientsItemItemWithFingerprintPutRequestBody
NewClientsItemItemWithFingerprintPutRequestBody instantiates a new ClientsItemItemWithFingerprintPutRequestBody and sets the default values.
func (*ClientsItemItemWithFingerprintPutRequestBody) GetAdditionalData ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) GetAdditionalData() map[string]any
GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. returns a map[string]any when successful
func (*ClientsItemItemWithFingerprintPutRequestBody) GetClientSecret ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) GetClientSecret() *string
GetClientSecret gets the client_secret property value. The OAuth app client secret for which to create the token. returns a *string when successful
func (*ClientsItemItemWithFingerprintPutRequestBody) GetFieldDeserializers ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error
GetFieldDeserializers the deserialization information for the current model returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (*ClientsItemItemWithFingerprintPutRequestBody) GetNote ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) GetNote() *string
GetNote gets the note property value. A note to remind you what the OAuth token is for. returns a *string when successful
func (*ClientsItemItemWithFingerprintPutRequestBody) GetNoteUrl ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) GetNoteUrl() *string
GetNoteUrl gets the note_url property value. A URL to remind you what app the OAuth token is for. returns a *string when successful
func (*ClientsItemItemWithFingerprintPutRequestBody) GetScopes ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) GetScopes() []string
GetScopes gets the scopes property value. A list of scopes that this authorization is in. returns a []string when successful
func (*ClientsItemItemWithFingerprintPutRequestBody) Serialize ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error
Serialize serializes information the current object
func (*ClientsItemItemWithFingerprintPutRequestBody) SetAdditionalData ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) SetAdditionalData(value map[string]any)
SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (*ClientsItemItemWithFingerprintPutRequestBody) SetClientSecret ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) SetClientSecret(value *string)
SetClientSecret sets the client_secret property value. The OAuth app client secret for which to create the token.
func (*ClientsItemItemWithFingerprintPutRequestBody) SetNote ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) SetNote(value *string)
SetNote sets the note property value. A note to remind you what the OAuth token is for.
func (*ClientsItemItemWithFingerprintPutRequestBody) SetNoteUrl ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) SetNoteUrl(value *string)
SetNoteUrl sets the note_url property value. A URL to remind you what app the OAuth token is for.
func (*ClientsItemItemWithFingerprintPutRequestBody) SetScopes ¶
func (m *ClientsItemItemWithFingerprintPutRequestBody) SetScopes(value []string)
SetScopes sets the scopes property value. A list of scopes that this authorization is in.
type ClientsItemItemWithFingerprintPutRequestBodyable ¶
type ClientsItemItemWithFingerprintPutRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetClientSecret() *string GetNote() *string GetNoteUrl() *string GetScopes() []string SetClientSecret(value *string) SetNote(value *string) SetNoteUrl(value *string) SetScopes(value []string) }
type ClientsItemWithClient_PutRequestBody ¶
type ClientsItemWithClient_PutRequestBody struct {
// contains filtered or unexported fields
}
func NewClientsItemWithClient_PutRequestBody ¶
func NewClientsItemWithClient_PutRequestBody() *ClientsItemWithClient_PutRequestBody
NewClientsItemWithClient_PutRequestBody instantiates a new ClientsItemWithClient_PutRequestBody and sets the default values.
func (*ClientsItemWithClient_PutRequestBody) GetAdditionalData ¶
func (m *ClientsItemWithClient_PutRequestBody) GetAdditionalData() map[string]any
GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. returns a map[string]any when successful
func (*ClientsItemWithClient_PutRequestBody) GetClientSecret ¶
func (m *ClientsItemWithClient_PutRequestBody) GetClientSecret() *string
GetClientSecret gets the client_secret property value. The OAuth app client secret for which to create the token. returns a *string when successful
func (*ClientsItemWithClient_PutRequestBody) GetFieldDeserializers ¶
func (m *ClientsItemWithClient_PutRequestBody) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error
GetFieldDeserializers the deserialization information for the current model returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (*ClientsItemWithClient_PutRequestBody) GetFingerprint ¶
func (m *ClientsItemWithClient_PutRequestBody) GetFingerprint() *string
GetFingerprint gets the fingerprint property value. A unique string to distinguish an authorization from others created for the same client ID and user. returns a *string when successful
func (*ClientsItemWithClient_PutRequestBody) GetNote ¶
func (m *ClientsItemWithClient_PutRequestBody) GetNote() *string
GetNote gets the note property value. A note to remind you what the OAuth token is for. returns a *string when successful
func (*ClientsItemWithClient_PutRequestBody) GetNoteUrl ¶
func (m *ClientsItemWithClient_PutRequestBody) GetNoteUrl() *string
GetNoteUrl gets the note_url property value. A URL to remind you what app the OAuth token is for. returns a *string when successful
func (*ClientsItemWithClient_PutRequestBody) GetScopes ¶
func (m *ClientsItemWithClient_PutRequestBody) GetScopes() []string
GetScopes gets the scopes property value. A list of scopes that this authorization is in. returns a []string when successful
func (*ClientsItemWithClient_PutRequestBody) Serialize ¶
func (m *ClientsItemWithClient_PutRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error
Serialize serializes information the current object
func (*ClientsItemWithClient_PutRequestBody) SetAdditionalData ¶
func (m *ClientsItemWithClient_PutRequestBody) SetAdditionalData(value map[string]any)
SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (*ClientsItemWithClient_PutRequestBody) SetClientSecret ¶
func (m *ClientsItemWithClient_PutRequestBody) SetClientSecret(value *string)
SetClientSecret sets the client_secret property value. The OAuth app client secret for which to create the token.
func (*ClientsItemWithClient_PutRequestBody) SetFingerprint ¶
func (m *ClientsItemWithClient_PutRequestBody) SetFingerprint(value *string)
SetFingerprint sets the fingerprint property value. A unique string to distinguish an authorization from others created for the same client ID and user.
func (*ClientsItemWithClient_PutRequestBody) SetNote ¶
func (m *ClientsItemWithClient_PutRequestBody) SetNote(value *string)
SetNote sets the note property value. A note to remind you what the OAuth token is for.
func (*ClientsItemWithClient_PutRequestBody) SetNoteUrl ¶
func (m *ClientsItemWithClient_PutRequestBody) SetNoteUrl(value *string)
SetNoteUrl sets the note_url property value. A URL to remind you what app the OAuth token is for.
func (*ClientsItemWithClient_PutRequestBody) SetScopes ¶
func (m *ClientsItemWithClient_PutRequestBody) SetScopes(value []string)
SetScopes sets the scopes property value. A list of scopes that this authorization is in.
type ClientsItemWithClient_PutRequestBodyable ¶
type ClientsItemWithClient_PutRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetClientSecret() *string GetFingerprint() *string GetNote() *string GetNoteUrl() *string GetScopes() []string SetClientSecret(value *string) SetFingerprint(value *string) SetNote(value *string) SetNoteUrl(value *string) SetScopes(value []string) }
type ClientsItemWithFingerprintItemRequestBuilder ¶
type ClientsItemWithFingerprintItemRequestBuilder struct {
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder
}
ClientsItemWithFingerprintItemRequestBuilder builds and executes requests for operations under \authorizations\clients\{client_id}\{fingerprint}
func NewClientsItemWithFingerprintItemRequestBuilder ¶
func NewClientsItemWithFingerprintItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ClientsItemWithFingerprintItemRequestBuilder
NewClientsItemWithFingerprintItemRequestBuilder instantiates a new ClientsItemWithFingerprintItemRequestBuilder and sets the default values.
func NewClientsItemWithFingerprintItemRequestBuilderInternal ¶
func NewClientsItemWithFingerprintItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ClientsItemWithFingerprintItemRequestBuilder
NewClientsItemWithFingerprintItemRequestBuilderInternal instantiates a new ClientsItemWithFingerprintItemRequestBuilder and sets the default values.
func (*ClientsItemWithFingerprintItemRequestBuilder) Put ¶
func (m *ClientsItemWithFingerprintItemRequestBuilder) Put(ctx context.Context, body ClientsItemItemWithFingerprintPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.Authorizationable, error)
Put > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).> [!WARNING]> Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.12/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." Deprecated: returns a Authorizationable when successful returns a ValidationError error when the service returns a 422 status code API method documentation
func (*ClientsItemWithFingerprintItemRequestBuilder) ToPutRequestInformation ¶
func (m *ClientsItemWithFingerprintItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ClientsItemItemWithFingerprintPutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error)
ToPutRequestInformation > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).> [!WARNING]> Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.12/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." Deprecated: returns a *RequestInformation when successful
func (*ClientsItemWithFingerprintItemRequestBuilder) WithUrl ¶
func (m *ClientsItemWithFingerprintItemRequestBuilder) WithUrl(rawUrl string) *ClientsItemWithFingerprintItemRequestBuilder
WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. Deprecated: returns a *ClientsItemWithFingerprintItemRequestBuilder when successful
type ClientsRequestBuilder ¶
type ClientsRequestBuilder struct {
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder
}
ClientsRequestBuilder builds and executes requests for operations under \authorizations\clients
func NewClientsRequestBuilder ¶
func NewClientsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ClientsRequestBuilder
NewClientsRequestBuilder instantiates a new ClientsRequestBuilder and sets the default values.
func NewClientsRequestBuilderInternal ¶
func NewClientsRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ClientsRequestBuilder
NewClientsRequestBuilderInternal instantiates a new ClientsRequestBuilder and sets the default values.
func (*ClientsRequestBuilder) ByClient_id ¶
func (m *ClientsRequestBuilder) ByClient_id(client_id string) *ClientsWithClient_ItemRequestBuilder
ByClient_id gets an item from the github.com/octokit/go-sdk-enterprise-server/pkg/github.authorizations.clients.item collection Deprecated: returns a *ClientsWithClient_ItemRequestBuilder when successful
type ClientsWithClient_ItemRequestBuilder ¶
type ClientsWithClient_ItemRequestBuilder struct {
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder
}
ClientsWithClient_ItemRequestBuilder builds and executes requests for operations under \authorizations\clients\{client_id}
func NewClientsWithClient_ItemRequestBuilder ¶
func NewClientsWithClient_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ClientsWithClient_ItemRequestBuilder
NewClientsWithClient_ItemRequestBuilder instantiates a new ClientsWithClient_ItemRequestBuilder and sets the default values.
func NewClientsWithClient_ItemRequestBuilderInternal ¶
func NewClientsWithClient_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *ClientsWithClient_ItemRequestBuilder
NewClientsWithClient_ItemRequestBuilderInternal instantiates a new ClientsWithClient_ItemRequestBuilder and sets the default values.
func (*ClientsWithClient_ItemRequestBuilder) ByFingerprint ¶
func (m *ClientsWithClient_ItemRequestBuilder) ByFingerprint(fingerprint string) *ClientsItemWithFingerprintItemRequestBuilder
ByFingerprint gets an item from the github.com/octokit/go-sdk-enterprise-server/pkg/github.authorizations.clients.item.item collection Deprecated: returns a *ClientsItemWithFingerprintItemRequestBuilder when successful
func (*ClientsWithClient_ItemRequestBuilder) Put ¶
func (m *ClientsWithClient_ItemRequestBuilder) Put(ctx context.Context, body ClientsItemWithClient_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.Authorizationable, error)
Put > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).> [!WARNING]> Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.12/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." Deprecated: returns a Authorizationable when successful returns a BasicError error when the service returns a 401 status code returns a BasicError error when the service returns a 403 status code returns a ValidationError error when the service returns a 422 status code API method documentation
func (*ClientsWithClient_ItemRequestBuilder) ToPutRequestInformation ¶
func (m *ClientsWithClient_ItemRequestBuilder) ToPutRequestInformation(ctx context.Context, body ClientsItemWithClient_PutRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error)
ToPutRequestInformation > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).> [!WARNING]> Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.12/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." Deprecated: returns a *RequestInformation when successful
func (*ClientsWithClient_ItemRequestBuilder) WithUrl ¶
func (m *ClientsWithClient_ItemRequestBuilder) WithUrl(rawUrl string) *ClientsWithClient_ItemRequestBuilder
WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. Deprecated: returns a *ClientsWithClient_ItemRequestBuilder when successful
type ItemWithAuthorization_PatchRequestBody ¶
type ItemWithAuthorization_PatchRequestBody struct {
// contains filtered or unexported fields
}
func NewItemWithAuthorization_PatchRequestBody ¶
func NewItemWithAuthorization_PatchRequestBody() *ItemWithAuthorization_PatchRequestBody
NewItemWithAuthorization_PatchRequestBody instantiates a new ItemWithAuthorization_PatchRequestBody and sets the default values.
func (*ItemWithAuthorization_PatchRequestBody) GetAddScopes ¶
func (m *ItemWithAuthorization_PatchRequestBody) GetAddScopes() []string
GetAddScopes gets the add_scopes property value. A list of scopes to add to this authorization. returns a []string when successful
func (*ItemWithAuthorization_PatchRequestBody) GetAdditionalData ¶
func (m *ItemWithAuthorization_PatchRequestBody) GetAdditionalData() map[string]any
GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. returns a map[string]any when successful
func (*ItemWithAuthorization_PatchRequestBody) GetFieldDeserializers ¶
func (m *ItemWithAuthorization_PatchRequestBody) GetFieldDeserializers() map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error
GetFieldDeserializers the deserialization information for the current model returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (*ItemWithAuthorization_PatchRequestBody) GetFingerprint ¶
func (m *ItemWithAuthorization_PatchRequestBody) GetFingerprint() *string
GetFingerprint gets the fingerprint property value. A unique string to distinguish an authorization from others created for the same client ID and user. returns a *string when successful
func (*ItemWithAuthorization_PatchRequestBody) GetNote ¶
func (m *ItemWithAuthorization_PatchRequestBody) GetNote() *string
GetNote gets the note property value. A note to remind you what the OAuth token is for. returns a *string when successful
func (*ItemWithAuthorization_PatchRequestBody) GetNoteUrl ¶
func (m *ItemWithAuthorization_PatchRequestBody) GetNoteUrl() *string
GetNoteUrl gets the note_url property value. A URL to remind you what app the OAuth token is for. returns a *string when successful
func (*ItemWithAuthorization_PatchRequestBody) GetRemoveScopes ¶
func (m *ItemWithAuthorization_PatchRequestBody) GetRemoveScopes() []string
GetRemoveScopes gets the remove_scopes property value. A list of scopes to remove from this authorization. returns a []string when successful
func (*ItemWithAuthorization_PatchRequestBody) GetScopes ¶
func (m *ItemWithAuthorization_PatchRequestBody) GetScopes() []string
GetScopes gets the scopes property value. A list of scopes that this authorization is in. returns a []string when successful
func (*ItemWithAuthorization_PatchRequestBody) Serialize ¶
func (m *ItemWithAuthorization_PatchRequestBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter) error
Serialize serializes information the current object
func (*ItemWithAuthorization_PatchRequestBody) SetAddScopes ¶
func (m *ItemWithAuthorization_PatchRequestBody) SetAddScopes(value []string)
SetAddScopes sets the add_scopes property value. A list of scopes to add to this authorization.
func (*ItemWithAuthorization_PatchRequestBody) SetAdditionalData ¶
func (m *ItemWithAuthorization_PatchRequestBody) SetAdditionalData(value map[string]any)
SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (*ItemWithAuthorization_PatchRequestBody) SetFingerprint ¶
func (m *ItemWithAuthorization_PatchRequestBody) SetFingerprint(value *string)
SetFingerprint sets the fingerprint property value. A unique string to distinguish an authorization from others created for the same client ID and user.
func (*ItemWithAuthorization_PatchRequestBody) SetNote ¶
func (m *ItemWithAuthorization_PatchRequestBody) SetNote(value *string)
SetNote sets the note property value. A note to remind you what the OAuth token is for.
func (*ItemWithAuthorization_PatchRequestBody) SetNoteUrl ¶
func (m *ItemWithAuthorization_PatchRequestBody) SetNoteUrl(value *string)
SetNoteUrl sets the note_url property value. A URL to remind you what app the OAuth token is for.
func (*ItemWithAuthorization_PatchRequestBody) SetRemoveScopes ¶
func (m *ItemWithAuthorization_PatchRequestBody) SetRemoveScopes(value []string)
SetRemoveScopes sets the remove_scopes property value. A list of scopes to remove from this authorization.
func (*ItemWithAuthorization_PatchRequestBody) SetScopes ¶
func (m *ItemWithAuthorization_PatchRequestBody) SetScopes(value []string)
SetScopes sets the scopes property value. A list of scopes that this authorization is in.
type ItemWithAuthorization_PatchRequestBodyable ¶
type ItemWithAuthorization_PatchRequestBodyable interface { i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetAddScopes() []string GetFingerprint() *string GetNote() *string GetNoteUrl() *string GetRemoveScopes() []string GetScopes() []string SetAddScopes(value []string) SetFingerprint(value *string) SetNote(value *string) SetNoteUrl(value *string) SetRemoveScopes(value []string) SetScopes(value []string) }
type WithAuthorization_ItemRequestBuilder ¶
type WithAuthorization_ItemRequestBuilder struct {
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder
}
WithAuthorization_ItemRequestBuilder builds and executes requests for operations under \authorizations\{authorization_id}
func NewWithAuthorization_ItemRequestBuilder ¶
func NewWithAuthorization_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *WithAuthorization_ItemRequestBuilder
NewWithAuthorization_ItemRequestBuilder instantiates a new WithAuthorization_ItemRequestBuilder and sets the default values.
func NewWithAuthorization_ItemRequestBuilderInternal ¶
func NewWithAuthorization_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *WithAuthorization_ItemRequestBuilder
NewWithAuthorization_ItemRequestBuilderInternal instantiates a new WithAuthorization_ItemRequestBuilder and sets the default values.
func (*WithAuthorization_ItemRequestBuilder) Delete ¶
func (m *WithAuthorization_ItemRequestBuilder) Delete(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) error
Delete > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). Deprecated: returns a BasicError error when the service returns a 401 status code returns a BasicError error when the service returns a 403 status code API method documentation
func (*WithAuthorization_ItemRequestBuilder) Get ¶
func (m *WithAuthorization_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.Authorizationable, error)
Get > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). Deprecated: returns a Authorizationable when successful returns a BasicError error when the service returns a 401 status code returns a BasicError error when the service returns a 403 status code API method documentation
func (*WithAuthorization_ItemRequestBuilder) Patch ¶
func (m *WithAuthorization_ItemRequestBuilder) Patch(ctx context.Context, body ItemWithAuthorization_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (ie1e2072a5a4eb80f74a1387d59644d3f70804e6b7b2f406016da8826571f1207.Authorizationable, error)
Patch > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.12/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."You can only send one of these scope keys at a time. Deprecated: returns a Authorizationable when successful returns a ValidationError error when the service returns a 422 status code API method documentation
func (*WithAuthorization_ItemRequestBuilder) ToDeleteRequestInformation ¶
func (m *WithAuthorization_ItemRequestBuilder) ToDeleteRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error)
ToDeleteRequestInformation > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). Deprecated: returns a *RequestInformation when successful
func (*WithAuthorization_ItemRequestBuilder) ToGetRequestInformation ¶
func (m *WithAuthorization_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error)
ToGetRequestInformation > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). Deprecated: returns a *RequestInformation when successful
func (*WithAuthorization_ItemRequestBuilder) ToPatchRequestInformation ¶
func (m *WithAuthorization_ItemRequestBuilder) ToPatchRequestInformation(ctx context.Context, body ItemWithAuthorization_PatchRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error)
ToPatchRequestInformation > [!WARNING]> **Deprecation notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/enterprise-server@3.12/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.12/rest/oauth-authorizations/oauth-authorizations) will be removed on November 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/enterprise-server@3.12/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."You can only send one of these scope keys at a time. Deprecated: returns a *RequestInformation when successful
func (*WithAuthorization_ItemRequestBuilder) WithUrl ¶
func (m *WithAuthorization_ItemRequestBuilder) WithUrl(rawUrl string) *WithAuthorization_ItemRequestBuilder
WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. Deprecated: returns a *WithAuthorization_ItemRequestBuilder when successful
Source Files
¶
- authorizations_post_request_body.go
- authorizations_request_builder.go
- clients_item_item_with_fingerprint_put_request_body.go
- clients_item_with_client_escaped_put_request_body.go
- clients_item_with_fingerprint_item_request_builder.go
- clients_request_builder.go
- clients_with_client_escaped_item_request_builder.go
- item_with_authorization_escaped_patch_request_body.go
- with_authorization_escaped_item_request_builder.go