Documentation ¶
Index ¶
- func SJWTBase64DecodeBytes(seg string) ([]byte, error)
- func SJWTBase64DecodeString(src string) (string, error)
- func SJWTBase64EncodeBytes(seg []byte) string
- func SJWTBase64EncodeString(src string) string
- func SJWTCheckFullIdentity(identityVal string, expireVal int, pubkeyPath string, timeoutVal int) (int, error)
- func SJWTCheckFullIdentityURL(identityVal string, expireVal int, timeoutVal int) (int, error)
- func SJWTCheckIdentity(identityVal string, expireVal int, pubkeyPath string, timeoutVal int) (int, error)
- func SJWTEncode(header SJWTHeader, payload SJWTPayload, prvkey interface{}) string
- func SJWTEncodeText(headerJSON string, payloadJSON string, prvkeyPath string) (string, error)
- func SJWTGetIdentity(origTN string, destTN string, attestVal string, origID string, x5uVal string, ...) (string, error)
- func SJWTGetURLContent(urlVal string, timeoutVal int) ([]byte, error)
- func SJWTParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error)
- func SJWTParseECPublicKeyFromPEM(key []byte) (*ecdsa.PublicKey, error)
- func SJWTRemoveWhiteSpaces(s string) string
- func SJWTSignWithPrvKey(signingString string, key interface{}) (string, error)
- func SJWTVerifyWithPubKey(signingString string, signature string, key interface{}) (int, error)
- type SJWTDest
- type SJWTHeader
- type SJWTOrig
- type SJWTPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SJWTBase64DecodeBytes ¶
SJWTBase64DecodeBytes takes in a base 64 encoded string and returns the actual bytes array or an error of it fails to decode the string
func SJWTBase64DecodeString ¶
SJWTBase64DecodeString takes in a base 64 encoded string and returns the actual string or an error of it fails to decode the string
func SJWTBase64EncodeBytes ¶
SJWTBase64EncodeBytes encode bytes array to base64 with padding stripped
func SJWTBase64EncodeString ¶
SJWTBase64EncodeString encode string to base64 with padding stripped
func SJWTCheckFullIdentity ¶
func SJWTCheckFullIdentity(identityVal string, expireVal int, pubkeyPath string, timeoutVal int) (int, error)
SJWTCheckFullIdentity - implements the verify of identity
func SJWTCheckFullIdentityURL ¶
SJWTCheckFullIdentityURL - implements the verify of identity using URL
func SJWTCheckIdentity ¶
func SJWTCheckIdentity(identityVal string, expireVal int, pubkeyPath string, timeoutVal int) (int, error)
SJWTCheckIdentity - implements the verify of identity
func SJWTEncode ¶
func SJWTEncode(header SJWTHeader, payload SJWTPayload, prvkey interface{}) string
SJWTEncode - encode payload to JWT
func SJWTEncodeText ¶
SJWTEncodeText - encode header and payload to JWT
func SJWTGetIdentity ¶
func SJWTGetIdentity(origTN string, destTN string, attestVal string, origID string, x5uVal string, prvkeyPath string) (string, error)
SJWTGetIdentity --
func SJWTGetURLContent ¶
SJWTGetURLContent --
func SJWTParseECPrivateKeyFromPEM ¶
func SJWTParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error)
SJWTParseECPrivateKeyFromPEM Parse PEM encoded Elliptic Curve Private Key Structure
func SJWTParseECPublicKeyFromPEM ¶
SJWTParseECPublicKeyFromPEM Parse PEM encoded PKCS1 or PKCS8 public key
func SJWTSignWithPrvKey ¶
SJWTSignWithPrvKey - implements the signing For this signing method, key must be an ecdsa.PrivateKey struct
Types ¶
type SJWTHeader ¶
type SJWTHeader struct { Alg string `json:"alg"` Ppt string `json:"ppt"` Typ string `json:"typ"` X5u string `json:"x5u"` }
SJWTHeader - header for JWT
type SJWTPayload ¶
type SJWTPayload struct { ATTest string `json:"attest"` Dest SJWTDest `json:"dest"` IAT int64 `json:"iat"` Orig SJWTOrig `json:"orig"` OrigID string `json:"origid"` }
SJWTPayload - JWT payload
func SJWTDecodeWithPubKey ¶
func SJWTDecodeWithPubKey(jwt string, expireVal int, pubkey interface{}) (*SJWTPayload, error)
SJWTDecodeWithPubKey - decode JWT string
func SJWTGetValidPayload ¶
func SJWTGetValidPayload(base64Payload string, expireVal int) (*SJWTPayload, error)
SJWTGetValidPayload --