Documentation
¶
Index ¶
- Constants
- func VerifyXSUAAJWTToken(ctx context.Context, tokenString string, config *XSUAAConfig, ...) error
- type CallbackReqInfo
- type JsonDN
- type OAuthResponse
- type OpenIDConfig
- type RequestInfo
- type Result
- type SaaSCallbackResponse
- type SmsCallbackResponse
- type SubscriptionHandler
- func (s *SubscriptionHandler) CreateTenant(reqInfo *RequestInfo) *Result
- func (s *SubscriptionHandler) DeleteTenant(reqInfo *RequestInfo) *Result
- func (s *SubscriptionHandler) HandleRequest(w http.ResponseWriter, req *http.Request, subscriptionType subscriptionType)
- func (s *SubscriptionHandler) HandleSMSRequest(w http.ResponseWriter, req *http.Request)
- func (s *SubscriptionHandler) HandleSaaSRequest(w http.ResponseWriter, req *http.Request)
- type XSUAAConfig
- type XSUAAJWTClaims
Constants ¶
View Source
const ( AnnotationSubscriptionContextSecret = "sme.sap.com/subscription-context-secret" AnnotationSaaSAdditionalOutput = "sme.sap.com/saas-additional-output" AnnotationSubscriptionDomain = "sme.sap.com/subscription-domain" )
View Source
const ( LabelBTPApplicationIdentifierHash = "sme.sap.com/btp-app-identifier-hash" LabelAppIdHash = "sme.sap.com/app-identifier-hash" LabelTenantId = "sme.sap.com/btp-tenant-id" LabelTenantType = "sme.sap.com/tenant-type" LabelSubscriptionGUID = "sme.sap.com/subscription-guid" )
View Source
const ( ResourceCreated = "resource created successfully" ResourceUpdated = "resource updated successfully" ResourceFound = "resource exists" ResourceDeleted = "resource deleted successfully" ResourceNotFound = "resource not found" TenantNotFound = "tenant not found" )
View Source
const ( CallbackSucceeded = "SUCCEEDED" CallbackFailed = "FAILED" ProvisioningSucceededMessage = "Provisioning successful" ProvisioningFailedMessage = "Provisioning failed" DeprovisioningSucceededMessage = "Deprovisioning successful" DeprovisioningFailedMessage = "Deprovisioning failed" )
View Source
const ( Step = "step" TenantProvisioning = "Tenant Provisioning" TenantDeprovisioning = "Tenant Deprovisioning" )
View Source
const ( SaaS subscriptionType = "SaaS" SMS subscriptionType = "SMS" )
View Source
const AuthorizationCheckFailed = "authorization check failed"
View Source
const BasicPrefix = "Basic "
View Source
const BearerPrefix = "Bearer "
View Source
const ErrorOccurred = "Error occurred "
View Source
const InvalidRequestMethod = "invalid request method"
Variables ¶
This section is empty.
Functions ¶
func VerifyXSUAAJWTToken ¶
func VerifyXSUAAJWTToken(ctx context.Context, tokenString string, config *XSUAAConfig, client *http.Client) error
token validation for XSUAA token implemented by following the guidelines provided -> CPSecurity/Knowledge-Base/03_ApplicationSecurity/TokenValidation/
Types ¶
type CallbackReqInfo ¶ added in v0.20.0
type CallbackReqInfo struct {
util.CredentialData
CallbackTimeoutMillis string
CallbackUrl string
CallbackPath string
SubscriptionType subscriptionType
}
type JsonDN ¶ added in v0.20.0
type JsonDN struct {
C stringslice `json:"C"`
O stringslice `json:"O"`
OU stringslice `json:"OU"`
L stringslice `json:"L"`
CN string `json:"CN"`
}
type OAuthResponse ¶
type OAuthResponse struct {
AccessToken string `json:"access_token"`
}
type OpenIDConfig ¶
type RequestInfo ¶ added in v0.20.0
type RequestInfo struct {
// contains filtered or unexported fields
}
func ProcessRequest ¶ added in v0.20.0
func ProcessRequest(req *http.Request, subscriptionType subscriptionType) (*RequestInfo, error)
type SaaSCallbackResponse ¶ added in v0.20.0
type SaaSCallbackResponse struct {
SubscriptionUrl string `json:"subscriptionUrl"`
// contains filtered or unexported fields
}
type SmsCallbackResponse ¶ added in v0.20.0
type SmsCallbackResponse struct {
ApplicationUrl string `json:"applicationUrl"`
// contains filtered or unexported fields
}
type SubscriptionHandler ¶
type SubscriptionHandler struct {
Clientset versioned.Interface
KubeClienset kubernetes.Interface
// contains filtered or unexported fields
}
func NewSubscriptionHandler ¶
func NewSubscriptionHandler(clientset versioned.Interface, kubeClienset kubernetes.Interface) *SubscriptionHandler
func (*SubscriptionHandler) CreateTenant ¶
func (s *SubscriptionHandler) CreateTenant(reqInfo *RequestInfo) *Result
func (*SubscriptionHandler) DeleteTenant ¶
func (s *SubscriptionHandler) DeleteTenant(reqInfo *RequestInfo) *Result
func (*SubscriptionHandler) HandleRequest ¶
func (s *SubscriptionHandler) HandleRequest(w http.ResponseWriter, req *http.Request, subscriptionType subscriptionType)
func (*SubscriptionHandler) HandleSMSRequest ¶ added in v0.20.0
func (s *SubscriptionHandler) HandleSMSRequest(w http.ResponseWriter, req *http.Request)
func (*SubscriptionHandler) HandleSaaSRequest ¶ added in v0.20.0
func (s *SubscriptionHandler) HandleSaaSRequest(w http.ResponseWriter, req *http.Request)
type XSUAAConfig ¶
type XSUAAJWTClaims ¶
type XSUAAJWTClaims struct {
Scope []string `json:"scope"`
ClientID string `json:"client_id"`
AuthorizedParty string `json:"azp"`
jwt.RegisteredClaims `json:",inline"`
}
Click to show internal directories.
Click to hide internal directories.