// RoundTrip implements http.RoundTripper interface.
RoundTrip implements http.RoundTripper interface.
// RoundTrip implements http . RoundTripper interface .
func (t *AppsTransport) RoundTrip(req *http.Request) (*http.Response, error) {
	claims := &jwt.StandardClaims{
		IssuedAt:  time.Now().Unix(),
		ExpiresAt: time.Now().Add(time.Minute).Unix(),
		Issuer:    strconv.FormatInt(t.integrationID, 10),
	}
	bearer := jwt.NewWithClaims(jwt.SigningMethodRS256, claims)
	ss, err := bearer.SignedString(t.key)
	if err != nil {
		return nil, fmt.Errorf("could not sign jwt: %s", err)
	}
	req.Header.Set("Authorization", "Bearer "+ss)
	req.Header.Set("Accept", acceptHeader)
	resp, err := t.tr.RoundTrip(req)
	return resp, err
}
func ( t * AppsTransport ) RoundTrip ( req * http . Request ) ( * http . Response , error ) { claims := & jwt . StandardClaims { IssuedAt : time . Now ( ) . Unix ( ) , ExpiresAt : time . Now ( ) . Add ( time . Minute ) . Unix ( ) , Issuer : strconv . FormatInt ( t . integrationID , 10 ) , } bearer := jwt . NewWithClaims ( jwt . SigningMethodRS256 , claims ) ss , err := bearer . SignedString ( t . key ) if err != nil { return nil , fmt . Errorf ( " " , err ) } req . Header . Set ( " " , " " + ss ) req . Header . Set ( " " , acceptHeader ) resp , err := t . tr . RoundTrip ( req ) return resp , err }
RoundTrip implements http.RoundTripper interface.
RoundTrip implements http . RoundTripper interface .