Giter Club home page Giter Club logo

device-check-go's Introduction

๐Ÿ˜Ž I'm maintaining ...

๐Ÿ‘พ Public Activities

๐Ÿƒโ€โ™‚๏ธ See more ...

๐Ÿค– Private Activities

๐Ÿค“ I like ...

โš™๏ธ Powered by ...

device-check-go's People

Contributors

naoto0822 avatar peter-meemo avatar ptrbrn avatar renovate-bot avatar renovate[bot] avatar rinchsan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

device-check-go's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Support cancellable (or custom) context.Context

  • Want to support cancellable (or custom) context.Context for http requests
  • Going to be a major release of v2
    • Create /v2 directory and copy existing files to the directory, and then support cancellable context.Context only in /v2 ? (according to the official go documentation)
    • https://blog.golang.org/v2-go-modules
  • Pass ctx context.Context as a first argument for query/update/validate methods
    • then pass it to api.do as a first argument

Dependency Dashboard

This issue contains a list of Renovate updates and their statuses.

This repository currently has no open or pending branches.


  • Check this box to trigger a request for Renovate to run again on this repository

returned errors discard information in response body

Apple's devicecheck endpoints return errors with both an error code and a response body. Multiple response bodies can be produced for the same error code (see here)*. e.g., 401 can represent an expired token or an invalid token.

The library currently maps each response code to a separate error object (e.g. 401 is mapped to ErrUnauthorized). This means that we cannot tell what the details of the error are. For some errors like 400 that can have many different reasons, this makes debugging challenging.

Proposed solution: instead of mapping response codes to static errors with static strings, create errors by mapping the response codes to an instance of an error type on a per-code basis, with that instance containing the response body string. This allows calling code to continue checking the error type, but preserves the details of the error. Basically, use go 1.13 style errors.

  • Apple used to have these response codes in their documentation, but I can't find them now that they've rewritten it for AppAttest...

ErrBitStateNotFound error is missing

Hi! I come from an older version of this library which was github.com/snowman-mh/device-check-go and it is redirecting me to this repo now. And I see that the older version was using ErrBitStateNotFound which is missing in this repository. The only trace of this error is found in README and is kind of misleading because the SDK doesn't return this error now:

if err := client.QueryTwoBits("DEVICE_TOKEN_FROM_CLIENT", &result); err != nil {
	// error handling
	// Note that SDK returns ErrBitStateNotFound error if no bits found
}

What would be a suitable replacement for this error in the current version of SDK? I browsed the code and didn't find any. It would be nice to update the README as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.