You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
561 B
Go
23 lines
561 B
Go
7 years ago
|
// Copyright 2017 Drone.IO Inc. All rights reserved.
|
||
|
// Use of this source code is governed by a BSD-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
|
package oauth2
|
||
|
|
||
|
import "errors"
|
||
|
|
||
|
// ErrState indicates the state is invalid.
|
||
|
var ErrState = errors.New("Invalid state")
|
||
|
|
||
|
// Error represents a failed authorization request.
|
||
|
type Error struct {
|
||
|
Code string `json:"error"`
|
||
|
Desc string `json:"error_description"`
|
||
|
}
|
||
|
|
||
|
// Error returns the string representation of an
|
||
|
// authorization error.
|
||
|
func (e *Error) Error() string {
|
||
|
return e.Code + ": " + e.Desc
|
||
|
}
|