Documentation ¶
Overview ¶
Index ¶
- Constants
- type Credential
- type CredentialOptionalData
- type CredentialOptionalDataEncoding
- type CredentialPrivateData
- type CredentialPrivateDataEncoding
- type CredentialPublicData
- type CredentialPublicDataEncoding
- type CredentialRefreshMethod
- type CredentialResponse
- type CredentialRoleID
- type CredentialType
- type CredentialUpdateRequest
- type CredentialUsage
Constants ¶
View Source
const ( ResourceType = "oic.r.cred" ResourceURI = "/oic/sec/cred" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type Credential struct { ID int `json:"credid,omitempty"` Type CredentialType `json:"credtype"` Subject string `json:"subjectuuid"` Usage CredentialUsage `json:"credusage,omitempty"` SupportedRefreshMethods []CredentialRefreshMethod `json:"crms,omitempty"` OptionalData *CredentialOptionalData `json:"optionaldata,omitempty"` Period string `json:"period,omitempty"` PrivateData *CredentialPrivateData `json:"privatedata,omitempty"` PublicData *CredentialPublicData `json:"publicdata,omitempty"` RoleID *CredentialRoleID `json:"roleid,omitempty"` Tag string `json:"tag,omitempty"` }
type CredentialOptionalData ¶
type CredentialOptionalData struct { DataInternal interface{} `json:"data"` Encoding CredentialOptionalDataEncoding `json:"encoding"` IsRevoked bool `json:"revstat"` }
func (CredentialOptionalData) Data ¶
func (c CredentialOptionalData) Data() []byte
type CredentialOptionalDataEncoding ¶
type CredentialOptionalDataEncoding string
const ( CredentialOptionalDataEncoding_JWT CredentialOptionalDataEncoding = CredentialOptionalDataEncoding(dataEncoding_JWT) CredentialOptionalDataEncoding_CWT CredentialOptionalDataEncoding = CredentialOptionalDataEncoding(dataEncoding_CWT) CredentialOptionalDataEncoding_BASE64 CredentialOptionalDataEncoding = CredentialOptionalDataEncoding(dataEncoding_BASE64) CredentialOptionalDataEncoding_PEM CredentialOptionalDataEncoding = CredentialOptionalDataEncoding(csr.CertificateEncoding_PEM) CredentialOptionalDataEncoding_DER CredentialOptionalDataEncoding = CredentialOptionalDataEncoding(csr.CertificateEncoding_DER) // iotivity-lite doesn't support it CredentialOptionalDataEncoding_RAW CredentialOptionalDataEncoding = CredentialOptionalDataEncoding(dataEncoding_RAW) )
type CredentialPrivateData ¶
type CredentialPrivateData struct { DataInternal interface{} `json:"data"` Encoding CredentialPrivateDataEncoding `json:"encoding"` Handle int `json:"handle,omitempty"` }
func (CredentialPrivateData) Data ¶
func (c CredentialPrivateData) Data() []byte
type CredentialPrivateDataEncoding ¶
type CredentialPrivateDataEncoding string
const ( CredentialPrivateDataEncoding_JWT CredentialPrivateDataEncoding = CredentialPrivateDataEncoding(dataEncoding_JWT) CredentialPrivateDataEncoding_CWT CredentialPrivateDataEncoding = CredentialPrivateDataEncoding(dataEncoding_CWT) CredentialPrivateDataEncoding_BASE64 CredentialPrivateDataEncoding = CredentialPrivateDataEncoding(dataEncoding_BASE64) CredentialPrivateDataEncoding_URI CredentialPrivateDataEncoding = CredentialPrivateDataEncoding(dataEncoding_URI) CredentialPrivateDataEncoding_HANDLE CredentialPrivateDataEncoding = CredentialPrivateDataEncoding(dataEncoding_HANDLE) CredentialPrivateDataEncoding_RAW CredentialPrivateDataEncoding = CredentialPrivateDataEncoding(dataEncoding_RAW) )
type CredentialPublicData ¶
type CredentialPublicData struct { DataInternal interface{} `json:"data"` Encoding CredentialPublicDataEncoding `json:"encoding"` }
func (CredentialPublicData) Data ¶
func (c CredentialPublicData) Data() []byte
type CredentialPublicDataEncoding ¶
type CredentialPublicDataEncoding string
const ( CredentialPublicDataEncoding_JWT CredentialPublicDataEncoding = CredentialPublicDataEncoding(dataEncoding_JWT) CredentialPublicDataEncoding_CWT CredentialPublicDataEncoding = CredentialPublicDataEncoding(dataEncoding_CWT) CredentialPublicDataEncoding_BASE64 CredentialPublicDataEncoding = CredentialPublicDataEncoding(dataEncoding_BASE64) CredentialPublicDataEncoding_URI CredentialPublicDataEncoding = CredentialPublicDataEncoding(dataEncoding_URI) CredentialPublicDataEncoding_PEM CredentialPublicDataEncoding = CredentialPublicDataEncoding(csr.CertificateEncoding_PEM) CredentialPublicDataEncoding_DER CredentialPublicDataEncoding = CredentialPublicDataEncoding(csr.CertificateEncoding_DER) // iotivity-lite doesn't support it CredentialPublicDataEncoding_RAW CredentialPublicDataEncoding = CredentialPublicDataEncoding(dataEncoding_RAW) )
type CredentialRefreshMethod ¶
type CredentialRefreshMethod string
const ( CredentialRefreshMethod_PROVISION_SERVICE CredentialRefreshMethod = "oic.sec.crm.pro" //nolint:gosec CredentialRefreshMethod_KEY_AGREEMENT_PROTOCOL_AND_RANDOM_PIN CredentialRefreshMethod = "oic.sec.crm.psk" //nolint:gosec CredentialRefreshMethod_KEY_AGREEMENT_PROTOCOL CredentialRefreshMethod = "oic.sec.crm.rdp" //nolint:gosec CredentialRefreshMethod_KEY_DISTRIBUTION_SERVICE CredentialRefreshMethod = "oic.sec.crm.skdc" //nolint:gosec CredentialRefreshMethod_PKCS10_REQUEST_TO_CA CredentialRefreshMethod = "oic.sec.crm.pk10" //nolint:gosec )
type CredentialResponse ¶
type CredentialResponse struct { ResourceOwner string `json:"rowneruuid"` Interfaces []string `json:"if"` ResourceTypes []string `json:"rt"` Name string `json:"n"` Credentials []Credential `json:"creds"` }
type CredentialRoleID ¶
type CredentialType ¶
type CredentialType uint8
const ( CredentialType_EMPTY CredentialType = 0 CredentialType_SYMMETRIC_PAIR_WISE CredentialType = 1 CredentialType_SYMMETRIC_GROUP CredentialType = 2 CredentialType_ASYMMETRIC_SIGNING CredentialType = 4 CredentialType_ASYMMETRIC_SIGNING_WITH_CERTIFICATE CredentialType = 8 CredentialType_PIN_OR_PASSWORD CredentialType = 16 CredentialType_ASYMMETRIC_ENCRYPTION_KEY CredentialType = 32 )
func (CredentialType) Has ¶
func (c CredentialType) Has(flag CredentialType) bool
Has returns true if the flag is set.
func (CredentialType) String ¶
func (c CredentialType) String() string
type CredentialUpdateRequest ¶
type CredentialUpdateRequest struct { ResourceOwner string `json:"rowneruuid,omitempty"` Credentials []Credential `json:"creds"` }
type CredentialUsage ¶
type CredentialUsage string
const ( CredentialUsage_TRUST_CA CredentialUsage = "oic.sec.cred.trustca" //nolint:gosec CredentialUsage_CERT CredentialUsage = "oic.sec.cred.cert" //nolint:gosec CredentialUsage_ROLE_CERT CredentialUsage = "oic.sec.cred.rolecert" //nolint:gosec CredentialUsage_MFG_TRUST_CA CredentialUsage = "oic.sec.cred.mfgtrustca" //nolint:gosec CredentialUsage_MFG_CERT CredentialUsage = "oic.sec.cred.mfgcert" //nolint:gosec )
Click to show internal directories.
Click to hide internal directories.