github.com/greenpau/go-authcrunch@v1.1.4/pkg/errors/jwks.go (about) 1 // Copyright 2022 Paul Greenberg greenpau@outlook.com 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package errors 16 17 // JWKS Errors 18 const ( 19 ErrJwksKeyIDEmpty StandardError = "jwks key id is empty" 20 ErrJwksKeyAlgoUnsupported StandardError = "jwks unsupported key algorithm %s for %s" 21 ErrJwksKeyTypeEmpty StandardError = "jwks key type is empty for %s" 22 ErrJwksKeyTypeUnsupported StandardError = "jwks unsupported key type %s for %s" 23 ErrJwksKeyUsageEmpty StandardError = "jwks key usage is empty for %s" 24 ErrJwksKeyUsageUnsupported StandardError = "jwks unsupported key usage %s for %s" 25 ErrJwksKeyExponentEmpty StandardError = "jwks key exponent is empty for %s" 26 ErrJwksKeyModulusEmpty StandardError = "jwks key modulus is empty for %s" 27 ErrJwksKeyDecodeModulus StandardError = "jwks failed to decode key %q modulus %q: %v" 28 ErrJwksKeyDecodeExponent StandardError = "jwks failed to decode key %q exponent: %v" 29 ErrJwksKeyConvExponent StandardError = "jwks failed to decode key %q exponent: %v" 30 31 ErrJwksKeyCurveEmpty StandardError = "jwks key curve is empty for %s" 32 ErrJwksKeyCurveUnsupported StandardError = "jwks unsupported key curve %s for %s" 33 ErrJwksKeyCurveCoordNotFound StandardError = "jwks key %q curve has no x/y coordinates" 34 ErrJwksKeyCoordLength StandardError = "jwks key %q curve %s coordinate is %d bytes in length, exp: %d bytes" 35 ErrJwksKeyDecodeCoord StandardError = "jwks failed to decode key %q curve %s coordinate: %v" 36 37 ErrJwksKeySharedSecretEmpty StandardError = "jwks shared secret key for %s is empty" 38 ErrJwksKeyDecodeSharedSecret StandardError = "jwks failed to decode shared secret key %q: %v" 39 40 ErrJwksKeyTypeNotImplemented StandardError = "jwks key %q type %q processing not implemented: %v" 41 )