Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider(client browserflow.Client, store authn.SessionStore, sessions *authn.SessionManager, recorder audit.Recorder, loginTTL time.Duration) *browserflow.Provider
Types ¶
type Client ¶
type Client struct {
// AccessSyncAppID enables GitHub-derived access. The OAuth client must then
// be the GitHub App's own OAuth credential: after identity lookup the
// user-to-server token lists the user's installations of that App and the
// repositories the user can access through each, which become the user's
// provider-derived grants. Zero disables the sync.
AccessSyncAppID int64
// contains filtered or unexported fields
}
func (*Client) AccessibleRepositories ¶
func (client *Client) AccessibleRepositories(ctx context.Context, accessToken string) ([]int64, error)
AccessibleRepositories re-derives the repositories a user token can reach through installations of the configured App; it is the refresh-time counterpart of the login sync and shares its bounds and fail-closed rules.
func (*Client) AuthorizationURL ¶
type TokenRejectedError ¶
type TokenRejectedError struct{ Status int }
TokenRejectedError reports that GitHub refused the user token itself (401 or non-rate-limited 403), as opposed to a transient failure. Refresh-time access sync drops the stored token on this error and keeps it on any other.
func (TokenRejectedError) Error ¶
func (err TokenRejectedError) Error() string
func (TokenRejectedError) Unauthorized ¶
func (TokenRejectedError) Unauthorized() bool
Unauthorized marks the error for callers that only know the interface.