Documentation ¶
Overview ¶
* Copyright © 2015-2018 Aeneas Rekkas <aeneas+oss@aeneas.io> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @author Aeneas Rekkas <aeneas+oss@aeneas.io> * @copyright 2015-2018 Aeneas Rekkas <aeneas+oss@aeneas.io> * @license Apache-2.0 *
Index ¶
- Constants
- Variables
- func AddressIsUnixSocket(address string) bool
- func BasicAuth(username, password string) string
- func CleanSQL(t *testing.T, db *sqlx.DB)
- func FositeStore() *storage.MemoryStore
- func GenerateSecret(length int) ([]byte, error)
- func HashByteSecret(secret []byte) []byte
- func HashStringSecret(secret string) []byte
- func IsRedirectURISecure(rc redirectConfiguration) func(redirectURI *url.URL) bool
- func LogError(err error, logger log.FieldLogger)
- func MatchesRange(r *http.Request, ranges []string) error
- func RejectInsecureRequests(reg tlsRegistry, c tlsConfig) negroni.HandlerFunc
- type BCrypt
- type FositeStorer
- type RegistryCookieStore
- type RegistryLogger
- type RegistryWriter
- type RouterAdmin
- type RouterPublic
Constants ¶
const ( OpenIDConnectKeyName = "hydra.openid.id-token" OAuth2JWTKeyName = "hydra.jwt.access-token" )
Variables ¶
var ( ErrNotFound = &fosite.RFC6749Error{ Code: http.StatusNotFound, Name: http.StatusText(http.StatusNotFound), Description: "Unable to located the requested resource", } ErrConflict = &fosite.RFC6749Error{ Code: http.StatusConflict, Name: http.StatusText(http.StatusConflict), Description: "Unable to process the requested resource because of conflict in the current state", } )
Functions ¶
func AddressIsUnixSocket ¶
func FositeStore ¶
func FositeStore() *storage.MemoryStore
func GenerateSecret ¶
func HashByteSecret ¶
HashByteSecret hashes the secret for consumption by the AEAD encryption algorithm which expects exactly 32 bytes.
The system secret is being hashed to always match exactly the 32 bytes required by AEAD, even if the secret is long or shorter.
func HashStringSecret ¶
HashStringSecret hashes the secret for consumption by the AEAD encryption algorithm which expects exactly 32 bytes.
The system secret is being hashed to always match exactly the 32 bytes required by AEAD, even if the secret is long or shorter.
func IsRedirectURISecure ¶
func LogError ¶
func LogError(err error, logger log.FieldLogger)
func RejectInsecureRequests ¶
func RejectInsecureRequests(reg tlsRegistry, c tlsConfig) negroni.HandlerFunc
Types ¶
type BCrypt ¶
type BCrypt struct {
// contains filtered or unexported fields
}
BCrypt implements a BCrypt hasher.
type FositeStorer ¶
type FositeStorer interface { fosite.Storage oauth2.CoreStorage openid.OpenIDConnectRequestStorage pkce.PKCERequestStorage RevokeRefreshToken(ctx context.Context, requestID string) error RevokeAccessToken(ctx context.Context, requestID string) error FlushInactiveAccessTokens(ctx context.Context, notAfter time.Time) error }
type RegistryCookieStore ¶
type RegistryLogger ¶
type RegistryLogger interface {
Logger() logrus.FieldLogger
}
type RegistryWriter ¶
type RouterAdmin ¶
type RouterAdmin struct {
*httprouter.Router
}
func NewRouterAdmin ¶
func NewRouterAdmin() *RouterAdmin
func (*RouterAdmin) RouterPublic ¶
func (r *RouterAdmin) RouterPublic() *RouterPublic
type RouterPublic ¶
type RouterPublic struct {
*httprouter.Router
}
func NewRouterPublic ¶
func NewRouterPublic() *RouterPublic
func (*RouterPublic) RouterAdmin ¶
func (r *RouterPublic) RouterAdmin() *RouterAdmin