Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for NewDecoder (0.2 sec)

  1. docs/sts/client-grants.go

    	if err != nil {
    		return nil, err
    	}
    	defer resp.Body.Close()
    	if resp.StatusCode != http.StatusOK {
    		return nil, fmt.Errorf("%s", resp.Status)
    	}
    
    	var idpToken JWTToken
    	if err = json.NewDecoder(resp.Body).Decode(&idpToken); err != nil {
    		return nil, err
    	}
    
    	return &credentials.ClientGrantsToken{Token: idpToken.AccessToken, Expiry: idpToken.Expiry}, nil
    }
    
    func main() {
    	flag.Parse()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 3.3K bytes
    - Viewed (0)
Back to top