Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicAuth ¶
type BasicAuth struct { // Username to use for authentication Username string // Password to use for authentication Password string }
BasicAuth contains details of BasicAuth Auth configuration
type CertificateGen ¶
type CertificateGen struct { // CommonName of the certificate // Deprecated: This field is only used for old implementation of fetching credentials from Application and Secrets // It should be removed when it is no longer supported CommonName string // Certificate generated by Application Registry Certificate []byte // PrivateKey generated by Application Registry PrivateKey []byte }
CertificateGen details of CertificateGen configuration
type Credentials ¶
type Credentials struct { // OAuth is OAuth configuration. OAuth *OAuth // BasicAuth is BasicAuth configuration. BasicAuth *BasicAuth // CertificateGen is CertificateGen configuration. CertificateGen *CertificateGen // CSRFTokenEndpointURL (optional) to fetch CSRF token // Deprecated: This field is only used for old implementation of fetching credentials from Application and Secrets. It is not used by authorization package. // It should be removed when it is no longer supported CSRFTokenEndpointURL string }
Credentials contains OAuth or BasicAuth configuration.
type FactoryConfiguration ¶
type FactoryConfiguration struct {
OAuthClientTimeout int
}
FactoryConfiguration holds factory configuration options
type OAuth ¶
type OAuth struct { // URL to OAuth token provider. URL string // ClientID to use for authorization. ClientID string // ClientSecret to use for authorization. ClientSecret string // RequestParameters will be used with request send by the Application Gateway. RequestParameters *RequestParameters }
OAuth contains details of OAuth configuration
type OAuthClient ¶
type RequestParameters ¶
type RequestParameters struct { Headers *map[string][]string `json:"headers,omitempty"` QueryParameters *map[string][]string `json:"queryParameters,omitempty"` }
RequestParameters contains Headers and QueryParameters
type Strategy ¶
type Strategy interface { // Adds Authorization header to the request AddAuthorization(r *http.Request, setter TransportSetter) apperrors.AppError // Invalidates internal state Invalidate() }
type StrategyFactory ¶
type StrategyFactory interface { // Creates strategy for credentials provided Create(credentials *Credentials) Strategy }
func NewStrategyFactory ¶
func NewStrategyFactory(config FactoryConfiguration) StrategyFactory
NewStrategyFactory creates factory for instantiating Strategy implementations
type TransportSetter ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.