Skip to content

Commit

Permalink
Exports ErrorToRFC6749Error again
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Dec 6, 2017
1 parent 8961d86 commit cc4d351
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion access_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (c *Fosite) WriteAccessError(rw http.ResponseWriter, _ AccessRequester, err
func writeJsonError(rw http.ResponseWriter, err error) {
rw.Header().Set("Content-Type", "application/json;charset=UTF-8")

rfcerr := errorToRFC6749Error(err)
rfcerr := ErrorToRFC6749Error(err)
js, err := json.Marshal(err)
if err != nil {
http.Error(rw, fmt.Sprintf(`{"error": "%s"}`, err.Error()), http.StatusInternalServerError)
Expand Down
2 changes: 1 addition & 1 deletion authorize_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

func (c *Fosite) WriteAuthorizeError(rw http.ResponseWriter, ar AuthorizeRequester, err error) {
rfcerr := errorToRFC6749Error(err)
rfcerr := ErrorToRFC6749Error(err)
if !ar.IsRedirectURIValid() {
js, err := json.MarshalIndent(rfcerr, "", "\t")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const (
errRevokationClientMismatchName = "revokation_client_mismatch"
)

func errorToRFC6749Error(err error) *RFC6749Error {
func ErrorToRFC6749Error(err error) *RFC6749Error {
if e, ok := err.(*RFC6749Error); ok {
return e
} else if e, ok := errors.Cause(err).(*RFC6749Error); ok {
Expand Down

0 comments on commit cc4d351

Please sign in to comment.