Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
Change ownURL to include public endpoint reroute
Browse files Browse the repository at this point in the history
  • Loading branch information
zdevaty committed Feb 3, 2024
1 parent dc00cf3 commit 7ee56e6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apiserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://openapi-generator.tech)

- API version: 1.0.0
- Build date: 2024-01-25T12:04:37.338334425Z[Etc/UTC]
- Build date: 2024-02-02T12:01:58.629258516Z[Etc/UTC]


### Running the server
Expand Down
2 changes: 1 addition & 1 deletion apiserver/model_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type Configuration struct {
// Normaly this value is set to false for a SP. If set to true the user has to re-authenticate (login at IdP) even it has a valid session to the IdP.
ForceAuthn bool `json:"forceAuthn,omitempty"`

// If you have to use a customized Entity Id, you can overwrite it here. Normaly the default value can be leave as it is.
// If you have to use a customized Entity Id, you can overwrite it here. Normally the default value can be left as it is.
EntityId string `json:"entityId,omitempty"`

// only send cookies over encrypted connection (HTTPS)
Expand Down
9 changes: 6 additions & 3 deletions conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,19 @@ func DeleteAllConfigurations(ctx context.Context) error {
}

func getElionaHost() string {
var eliDomain string

db := getDb()
row := db.QueryRow("SELECT domain_name FROM eliona_config ;")

var eliDomain string
err := row.Scan(&eliDomain)
if err != nil {
log.Error(LOG_REGIO, "scan getElionaHost: %v", err)
}

return eliDomain
publicEndpoint := "apps-public/saml-sso"
ownURL := eliDomain + publicEndpoint

return ownURL
}

func getDb() *sql.DB {
Expand Down
2 changes: 1 addition & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ components:
default: false
example: false
entityId:
description: If you have to use a customized Entity Id, you can overwrite it here. Normaly the default value can be leave as it is.
description: If you have to use a customized Entity Id, you can overwrite it here. Normally the default value can be left as it is.
type: string
nullable: false
readOnly: false
Expand Down
2 changes: 1 addition & 1 deletion saml/service_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func NewServiceProviderAdvanced(certificate string, privateKey string, baseUrl s
idpMeta, err := samlsp.ParseMetadata(idpMetadata)
if err != nil {
log.Warn(LOG_REGIO, "cannot parse metadata. "+
"continiue without, but cannot operate with a IdP in current state! ... %v", err)
"continuing without, but cannot operate with a IdP in current state! ... %v", err)
// return nil, err
}

Expand Down

0 comments on commit 7ee56e6

Please sign in to comment.