Documentation ¶
Index ¶
- type ApiService
- type CreateTokenParams
- func (params *CreateTokenParams) SetAudience(Audience string) *CreateTokenParams
- func (params *CreateTokenParams) SetClientId(ClientId string) *CreateTokenParams
- func (params *CreateTokenParams) SetClientSecret(ClientSecret string) *CreateTokenParams
- func (params *CreateTokenParams) SetCode(Code string) *CreateTokenParams
- func (params *CreateTokenParams) SetGrantType(GrantType string) *CreateTokenParams
- func (params *CreateTokenParams) SetRedirectUri(RedirectUri string) *CreateTokenParams
- func (params *CreateTokenParams) SetRefreshToken(RefreshToken string) *CreateTokenParams
- func (params *CreateTokenParams) SetScope(Scope string) *CreateTokenParams
- type FetchAuthorizeParams
- func (params *FetchAuthorizeParams) SetClientId(ClientId string) *FetchAuthorizeParams
- func (params *FetchAuthorizeParams) SetRedirectUri(RedirectUri string) *FetchAuthorizeParams
- func (params *FetchAuthorizeParams) SetResponseType(ResponseType string) *FetchAuthorizeParams
- func (params *FetchAuthorizeParams) SetScope(Scope string) *FetchAuthorizeParams
- func (params *FetchAuthorizeParams) SetState(State string) *FetchAuthorizeParams
- type OauthV1Authorize
- type OauthV1Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶
func NewApiService(requestHandler *twilio.RequestHandler) *ApiService
func NewApiServiceWithClient ¶
func NewApiServiceWithClient(client twilio.BaseClient) *ApiService
func (*ApiService) CreateToken ¶
func (c *ApiService) CreateToken(params *CreateTokenParams) (*OauthV1Token, error)
Issues a new Access token (optionally identity_token & refresh_token) in exchange of Oauth grant
func (*ApiService) FetchAuthorize ¶ added in v1.19.1
func (c *ApiService) FetchAuthorize(params *FetchAuthorizeParams) (*OauthV1Authorize, error)
Retrieves authorize uri
type CreateTokenParams ¶
type CreateTokenParams struct { // Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token. GrantType *string `json:"GrantType,omitempty"` // A 34 character string that uniquely identifies this OAuth App. ClientId *string `json:"ClientId,omitempty"` // The credential for confidential OAuth App. ClientSecret *string `json:"ClientSecret,omitempty"` // JWT token related to the authorization code grant type. Code *string `json:"Code,omitempty"` // The redirect uri RedirectUri *string `json:"RedirectUri,omitempty"` // The targeted audience uri Audience *string `json:"Audience,omitempty"` // JWT token related to refresh access token. RefreshToken *string `json:"RefreshToken,omitempty"` // The scope of token Scope *string `json:"Scope,omitempty"` }
Optional parameters for the method 'CreateToken'
func (*CreateTokenParams) SetAudience ¶ added in v1.19.1
func (params *CreateTokenParams) SetAudience(Audience string) *CreateTokenParams
func (*CreateTokenParams) SetClientId ¶ added in v1.19.1
func (params *CreateTokenParams) SetClientId(ClientId string) *CreateTokenParams
func (*CreateTokenParams) SetClientSecret ¶
func (params *CreateTokenParams) SetClientSecret(ClientSecret string) *CreateTokenParams
func (*CreateTokenParams) SetCode ¶
func (params *CreateTokenParams) SetCode(Code string) *CreateTokenParams
func (*CreateTokenParams) SetGrantType ¶
func (params *CreateTokenParams) SetGrantType(GrantType string) *CreateTokenParams
func (*CreateTokenParams) SetRedirectUri ¶ added in v1.19.1
func (params *CreateTokenParams) SetRedirectUri(RedirectUri string) *CreateTokenParams
func (*CreateTokenParams) SetRefreshToken ¶
func (params *CreateTokenParams) SetRefreshToken(RefreshToken string) *CreateTokenParams
func (*CreateTokenParams) SetScope ¶ added in v1.19.1
func (params *CreateTokenParams) SetScope(Scope string) *CreateTokenParams
type FetchAuthorizeParams ¶ added in v1.19.1
type FetchAuthorizeParams struct { // Response Type ResponseType *string `json:"ResponseType,omitempty"` // The Client Identifier ClientId *string `json:"ClientId,omitempty"` // The url to which response will be redirected to RedirectUri *string `json:"RedirectUri,omitempty"` // The scope of the access request Scope *string `json:"Scope,omitempty"` // An opaque value which can be used to maintain state between the request and callback State *string `json:"State,omitempty"` }
Optional parameters for the method 'FetchAuthorize'
func (*FetchAuthorizeParams) SetClientId ¶ added in v1.19.1
func (params *FetchAuthorizeParams) SetClientId(ClientId string) *FetchAuthorizeParams
func (*FetchAuthorizeParams) SetRedirectUri ¶ added in v1.19.1
func (params *FetchAuthorizeParams) SetRedirectUri(RedirectUri string) *FetchAuthorizeParams
func (*FetchAuthorizeParams) SetResponseType ¶ added in v1.19.1
func (params *FetchAuthorizeParams) SetResponseType(ResponseType string) *FetchAuthorizeParams
func (*FetchAuthorizeParams) SetScope ¶ added in v1.19.1
func (params *FetchAuthorizeParams) SetScope(Scope string) *FetchAuthorizeParams
func (*FetchAuthorizeParams) SetState ¶ added in v1.19.1
func (params *FetchAuthorizeParams) SetState(State string) *FetchAuthorizeParams
type OauthV1Authorize ¶ added in v1.19.1
type OauthV1Authorize struct { // The callback URL RedirectTo *string `json:"redirect_to,omitempty"` }
OauthV1Authorize struct for OauthV1Authorize
type OauthV1Token ¶
type OauthV1Token struct { // Token which carries the necessary information to access a Twilio resource directly. AccessToken *string `json:"access_token,omitempty"` // Token which carries the information necessary to get a new access token. RefreshToken *string `json:"refresh_token,omitempty"` // Token which carries the information necessary of user profile. IdToken *string `json:"id_token,omitempty"` // Token type TokenType *string `json:"token_type,omitempty"` ExpiresIn *int64 `json:"expires_in,omitempty"` }
OauthV1Token struct for OauthV1Token
Click to show internal directories.
Click to hide internal directories.