Documentation
¶
Index ¶
Constants ¶
View Source
const ( RSAPublicKeyPemType = "RSA PUBLIC KEY" RSAPrivateKeyPemType = "RSA PRIVATE KEY" JWTIssuerName = "wssdagentsvc" )
Variables ¶
This section is empty.
Functions ¶
func GeneratePrivateKey ¶
GeneratePrivateKey generates a private key for JWT
Types ¶
type JwtAuthorizer ¶
type JwtAuthorizer struct {
// contains filtered or unexported fields
}
func NewJwtAuthorizer ¶
func NewJwtAuthorizer(keyLocation string) (*JwtAuthorizer, error)
NewJwtAuthorizer Creates Authorizer which will validate tokens
func NewJwtAuthorizerFromKey ¶
func NewJwtAuthorizerFromKey(key crypto.PublicKey) (*JwtAuthorizer, error)
NewJwtAuthorizer Creates Authorizer which will validate tokens
func (*JwtAuthorizer) UpdatePublicKey ¶
func (ja *JwtAuthorizer) UpdatePublicKey(publicKey *rsa.PublicKey)
UpdatePublicKey updates an Authorizer's Public Key
func (*JwtAuthorizer) ValidateTokenFromContext ¶
ValidateTokenFromContext obtains the token from the context of the call
func (*JwtAuthorizer) WritePublicKeyToPem ¶
func (ja *JwtAuthorizer) WritePublicKeyToPem(keyLocation string) error
WritePublicKeyToPem creates a pem for a public key and writes it to disk
type JwtSigner ¶
type JwtSigner struct {
// contains filtered or unexported fields
}
func NewJwtSigner ¶
NewJwtSigner Creates Signer which will sign tokens
func (*JwtSigner) GetPublicKey ¶
GetPublicKey returns the Signer's PublicKey
Click to show internal directories.
Click to hide internal directories.