Documentation ¶
Index ¶
- type DefaultIdentity
- func (c DefaultIdentity) GetAppTID() string
- func (c DefaultIdentity) GetAuthorizationInstanceID() string
- func (c DefaultIdentity) GetCertificate() string
- func (c DefaultIdentity) GetCertificateExpiresAt() string
- func (c DefaultIdentity) GetClientID() string
- func (c DefaultIdentity) GetClientSecret() string
- func (c DefaultIdentity) GetDomains() []string
- func (c DefaultIdentity) GetKey() string
- func (c DefaultIdentity) GetOsbURL() string
- func (c DefaultIdentity) GetProofTokenURL() string
- func (c DefaultIdentity) GetURL() string
- func (c DefaultIdentity) GetZoneUUID() uuid.UUID
- func (c DefaultIdentity) IsCertificateBased() bool
- type Identity
- type Platform
- type VCAPServices
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultIdentity ¶ added in v0.12.0
type DefaultIdentity struct { ClientID string `json:"clientid"` ClientSecret string `json:"clientsecret"` Domains []string `json:"domains"` URL string `json:"url"` ZoneUUID uuid.UUID `json:"zone_uuid"` // Deprecated: will be replaced by AppTID AppTID string `json:"app_tid"` // replaces ZoneUUID ProofTokenURL string `json:"prooftoken_url"` OsbURL string `json:"osb_url"` Certificate string `json:"certificate"` Key string `json:"key"` CertificateExpiresAt string `json:"certificate_expires_at"` AuthorizationInstanceID string `json:"authorization_instance_id"` }
DefaultIdentity represents the parsed credentials from the ias binding
func (DefaultIdentity) GetAppTID ¶ added in v0.16.0
func (c DefaultIdentity) GetAppTID() string
GetAppTID implements the env.Identity interface and replaces GetZoneUUID in future
func (DefaultIdentity) GetAuthorizationInstanceID ¶ added in v0.20.0
func (c DefaultIdentity) GetAuthorizationInstanceID() string
GetAuthorizationInstanceID implements the env.Identity interface.
func (DefaultIdentity) GetCertificate ¶ added in v0.12.0
func (c DefaultIdentity) GetCertificate() string
GetCertificate implements the env.Identity interface.
func (DefaultIdentity) GetCertificateExpiresAt ¶ added in v0.12.0
func (c DefaultIdentity) GetCertificateExpiresAt() string
GetCertificateExpiresAt implements the env.Identity interface.
func (DefaultIdentity) GetClientID ¶ added in v0.12.0
func (c DefaultIdentity) GetClientID() string
GetClientID implements the env.Identity interface.
func (DefaultIdentity) GetClientSecret ¶ added in v0.12.0
func (c DefaultIdentity) GetClientSecret() string
GetClientSecret implements the env.Identity interface.
func (DefaultIdentity) GetDomains ¶ added in v0.12.0
func (c DefaultIdentity) GetDomains() []string
GetDomains implements the env.Identity interface.
func (DefaultIdentity) GetKey ¶ added in v0.12.0
func (c DefaultIdentity) GetKey() string
GetKey implements the env.Identity interface.
func (DefaultIdentity) GetOsbURL ¶ added in v0.12.0
func (c DefaultIdentity) GetOsbURL() string
GetOsbURL implements the env.Identity interface.
func (DefaultIdentity) GetProofTokenURL ¶ added in v0.12.0
func (c DefaultIdentity) GetProofTokenURL() string
GetProofTokenURL implements the env.Identity interface.
func (DefaultIdentity) GetURL ¶ added in v0.12.0
func (c DefaultIdentity) GetURL() string
GetURL implements the env.Identity interface.
func (DefaultIdentity) GetZoneUUID ¶ added in v0.12.0
func (c DefaultIdentity) GetZoneUUID() uuid.UUID
GetZoneUUID implements the env.Identity interface. Deprecated: is replaced by GetAppTID and will be removed with the next major release
func (DefaultIdentity) IsCertificateBased ¶ added in v0.12.0
func (c DefaultIdentity) IsCertificateBased() bool
IsCertificateBased implements the env.Identity interface.
type Identity ¶ added in v0.7.0
type Identity interface { GetClientID() string // Returns the client id of the oAuth client. GetClientSecret() string // Returns the client secret. Optional GetURL() string // Returns the url to the DefaultIdentity tenant. E.g. https://abcdefgh.accounts.ondemand.com GetDomains() []string // Returns the domains of the DefaultIdentity service. E.g. ["accounts.ondemand.com"] GetZoneUUID() uuid.UUID // Deprecated: Returns the zone uuid, will be replaced by GetAppTID Optional GetAppTID() string // Returns the app tid uuid and replaces zone uuid in future Optional GetProofTokenURL() string // Returns the proof token url. Optional GetCertificate() string // Returns the client certificate. Optional GetKey() string // Returns the client certificate key. Optional GetCertificateExpiresAt() string // Returns the client certificate expiration time. Optional GetAuthorizationInstanceID() string // Returns the AMS instance id if authorization is enabled IsCertificateBased() bool // Returns true, in case GetCertificate() and GetKey returns non-empty values }
Identity interface has to be implemented to instantiate NewMiddleware. For IAS the standard implementation IASConfig from ../env/iasConfig.go package can be used.
func ParseIdentityConfig ¶ added in v0.12.0
ParseIdentityConfig parses the IAS config from the applications environment
type Platform ¶
type Platform string
Platform holds the type string of the platform the application runs on
type VCAPServices ¶ added in v0.7.0
type VCAPServices struct { Identity []struct { Credentials DefaultIdentity `json:"credentials"` } `json:"identity"` }
VCAPServices is the Cloud Foundry environment variable that stores information about services bound to the application