Documentation ¶
Index ¶
- Constants
- func GetAccountId(config map[string]interface{}, idKey string) string
- func Init()
- func WithOAuthClientTimeout(timeout time.Duration) func(*OAuthErrResHandler)
- func WithRudderFlow(rudderFlow RudderFlow) func(*OAuthErrResHandler)
- type AccountSecret
- type AuthResponse
- type AuthType
- type Authorizer
- type ControlPlaneRequestT
- type DisableDestinationResponse
- type OAuthErrResHandler
- func (authErrHandler *OAuthErrResHandler) DisableDestination(destination *backendconfig.DestinationT, workspaceId, rudderAccountId string) (statusCode int, respBody string)
- func (authErrHandler *OAuthErrResHandler) FetchToken(fetchTokenParams *RefreshTokenParams) (int, *AuthResponse)
- func (authErrHandler *OAuthErrResHandler) GetTokenInfo(refTokenParams *RefreshTokenParams, logTypeName string, authStats *OAuthStats) (int, *AuthResponse)
- func (authErrHandler *OAuthErrResHandler) RefreshToken(refTokenParams *RefreshTokenParams) (int, *AuthResponse)
- type OAuthStats
- type RefreshTokenBodyParams
- type RefreshTokenParams
- type RudderFlow
Constants ¶
View Source
const ( OAuth AuthType = "OAuth" InvalidAuthType AuthType = "InvalidAuthType" RudderFlow_Delivery RudderFlow = "delivery" RudderFlow_Delete RudderFlow = "delete" DeleteAccountIdKey = "rudderDeleteAccountId" DeliveryAccountIdKey = "rudderAccountId" )
View Source
const ( DISABLE_DEST = "DISABLE_DESTINATION" REFRESH_TOKEN = "REFRESH_TOKEN" INVALID_REFRESH_TOKEN_GRANT = "refresh_token_invalid_grant" )
Variables ¶
This section is empty.
Functions ¶
func GetAccountId ¶
func WithOAuthClientTimeout ¶
func WithOAuthClientTimeout(timeout time.Duration) func(*OAuthErrResHandler)
func WithRudderFlow ¶
func WithRudderFlow(rudderFlow RudderFlow) func(*OAuthErrResHandler)
Types ¶
type AccountSecret ¶
type AccountSecret struct { ExpirationDate string `json:"expirationDate"` Secret json.RawMessage `json:"secret"` }
type AuthResponse ¶
type AuthResponse struct { Account AccountSecret Err string }
type Authorizer ¶
type Authorizer interface { DisableDestination(destination *backendconfig.DestinationT, workspaceId, rudderAccountId string) (statusCode int, resBody string) RefreshToken(refTokenParams *RefreshTokenParams) (int, *AuthResponse) FetchToken(fetchTokenParams *RefreshTokenParams) (int, *AuthResponse) }
type ControlPlaneRequestT ¶
type OAuthErrResHandler ¶
type OAuthErrResHandler struct {
// contains filtered or unexported fields
}
OAuthErrResHandler is the handle for this class
func NewOAuthErrorHandler ¶
func NewOAuthErrorHandler(provider tokenProvider, options ...func(*OAuthErrResHandler)) *OAuthErrResHandler
This function creates a new OauthErrorResponseHandler
func (*OAuthErrResHandler) DisableDestination ¶
func (authErrHandler *OAuthErrResHandler) DisableDestination(destination *backendconfig.DestinationT, workspaceId, rudderAccountId string) (statusCode int, respBody string)
func (*OAuthErrResHandler) FetchToken ¶
func (authErrHandler *OAuthErrResHandler) FetchToken(fetchTokenParams *RefreshTokenParams) (int, *AuthResponse)
func (*OAuthErrResHandler) GetTokenInfo ¶
func (authErrHandler *OAuthErrResHandler) GetTokenInfo(refTokenParams *RefreshTokenParams, logTypeName string, authStats *OAuthStats) (int, *AuthResponse)
func (*OAuthErrResHandler) RefreshToken ¶
func (authErrHandler *OAuthErrResHandler) RefreshToken(refTokenParams *RefreshTokenParams) (int, *AuthResponse)
type OAuthStats ¶
type OAuthStats struct {
// contains filtered or unexported fields
}
func (*OAuthStats) SendCountStat ¶
func (refStats *OAuthStats) SendCountStat()
Send count type stats related to OAuth(Destination)
func (*OAuthStats) SendTimerStats ¶
func (authStats *OAuthStats) SendTimerStats(startTime time.Time)
type RefreshTokenBodyParams ¶
type RefreshTokenBodyParams struct { HasExpired bool `json:"hasExpired"` ExpiredSecret json.RawMessage `json:"expiredSecret"` }
This struct only exists for marshalling and sending payload to control-plane
type RefreshTokenParams ¶
type RudderFlow ¶
type RudderFlow string
Click to show internal directories.
Click to hide internal directories.