Documentation ¶
Overview ¶
********************************************************************************** The MIT License (MIT)
Copyright (c) 2022 Sean Beard ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **********************************************************************************
********************************************************************************** The MIT License (MIT)
Copyright (c) 2022 Sean Beard ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **********************************************************************************
********************************************************************************** The MIT License (MIT)
Copyright (c) 2022 Sean Beard ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **********************************************************************************
********************************************************************************** The MIT License (MIT)
Copyright (c) 2022 Sean Beard ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **********************************************************************************
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileKeyManager ¶
type FileKeyManager struct {
// contains filtered or unexported fields
}
Comment, Comment, Comment
func NewFileKeyManager ¶
func NewFileKeyManager(config *KeyManagerConfig) *FileKeyManager
http://stackoverflow.com/questions/13555085/save-and-load-crypto-rsa-privatekey-to-and-from-the-disk Comment, Comment, Comment
func (*FileKeyManager) Configuration ¶
func (fileKeys *FileKeyManager) Configuration() *KeyManagerConfig
func (*FileKeyManager) PrivateKey ¶
func (fileKeys *FileKeyManager) PrivateKey() interface{}
Comment, Comment, Comment
func (*FileKeyManager) PrivateKeyString ¶
func (fileKeys *FileKeyManager) PrivateKeyString() string
Comment, Comment, Comment
func (*FileKeyManager) PublicKey ¶
func (fileKeys *FileKeyManager) PublicKey() interface{}
Comment, Comment, Comment
func (*FileKeyManager) PublicKeyString ¶
func (fileKeys *FileKeyManager) PublicKeyString() string
Comment, Comment, Comment
type KeyManager ¶
type KeyManager interface { Configuration() *KeyManagerConfig PrivateKey() interface{} PublicKey() interface{} PrivateKeyString() string PublicKeyString() string }
TODO: Comment, Comment, Comment
func GetKeyManager ¶
func GetKeyManager(config *KeyManagerConfig) KeyManager
TODO: Factory Method Comment, Comment, Comment
type KeyManagerConfig ¶
type KeyManagerConfig struct { KeyManager KeyManagerType `json:"keymanager"` Parameters map[string]interface{} `json:"parameters"` }
TODO: Comment, Comment, Comment
func (*KeyManagerConfig) MarshallJSON ¶
func (keyManager *KeyManagerConfig) MarshallJSON() ([]byte, error)
MarshallJSON allows easy conversion of enumerated types to a JSON strings
func (*KeyManagerConfig) UnmarshalJSON ¶
func (keyManager *KeyManagerConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON allows easy conversion of enumerated types from a JSON strings
type KeyManagerType ¶
type KeyManagerType int
KeyManagerType represents an Enum type for the different Key Management strategies for sigining JWTs
const ( // FILE type rerpesents key files residining alongside the service FILE KeyManagerType = iota // AWSKMS type represents key files residing within the AWS Key Management Service (KMS) AWSKMS )
func KeyManagerTypeFromString ¶
func KeyManagerTypeFromString(enumString string) (KeyManagerType, error)
KeyManagerTypeFromString converts a string to the appropriate EnumActionType value. An error is returned if the string does not match an ActionType
func (KeyManagerType) ToString ¶
func (enum KeyManagerType) ToString() (string, error)
ToString takes the the current KeyManagerType enum and converts it to a string. Returns the string representation or an error that occurred from the operation