Documentation ¶
Index ¶
- Variables
- func ConvertToAppUser(request *goa.RequestData, user *account.User, identity *account.Identity) *app.User
- func ConvertUserSimple(request *goa.RequestData, identityID interface{}) *app.GenericData
- func ConvertUsersSimple(request *goa.RequestData, identityIDs []interface{}) []*app.GenericData
- func GenerateUserToken(ctx context.Context, tokenEndpoint string, configuration LoginConfiguration, ...) (*app.AuthToken, error)
- func LoadKeyCloakIdentities(appl application.Application, users []account.User) ([]account.User, []account.Identity, error)
- type CollaboratorsController
- func (c *CollaboratorsController) Add(ctx *app.AddCollaboratorsContext) error
- func (c *CollaboratorsController) AddMany(ctx *app.AddManyCollaboratorsContext) error
- func (c *CollaboratorsController) List(ctx *app.ListCollaboratorsContext) error
- func (c *CollaboratorsController) Remove(ctx *app.RemoveCollaboratorsContext) error
- func (c *CollaboratorsController) RemoveMany(ctx *app.RemoveManyCollaboratorsContext) error
- type LinkController
- type LoginConfiguration
- type LoginController
- type LogoutController
- type ResourceController
- type SearchController
- type SpaceConfiguration
- type SpaceController
- type StatusController
- type TokenController
- type UserController
- type UserControllerConfiguration
- type UsersController
- type UsersControllerConfiguration
Constants ¶
This section is empty.
Variables ¶
var ( // Commit current build commit set by build script Commit = "0" // BuildTime set by build script in ISO 8601 (UTC) format: YYYY-MM-DDThh:mm:ssTZD (see https://www.w3.org/TR/NOTE-datetime for details) BuildTime = "0" // StartTime in ISO 8601 (UTC) format StartTime = time.Now().UTC().Format("2006-01-02T15:04:05Z") )
Functions ¶
func ConvertToAppUser ¶
func ConvertToAppUser(request *goa.RequestData, user *account.User, identity *account.Identity) *app.User
ConvertToAppUser converts a complete Identity object into REST representation
func ConvertUserSimple ¶
func ConvertUserSimple(request *goa.RequestData, identityID interface{}) *app.GenericData
ConvertUserSimple converts a simple Identity ID into a Generic Reletionship
func ConvertUsersSimple ¶
func ConvertUsersSimple(request *goa.RequestData, identityIDs []interface{}) []*app.GenericData
ConvertUsersSimple converts a array of simple Identity IDs into a Generic Reletionship List
func GenerateUserToken ¶
func GenerateUserToken(ctx context.Context, tokenEndpoint string, configuration LoginConfiguration, username string, userSecret string) (*app.AuthToken, error)
GenerateUserToken obtains the access token from Keycloak for the user
func LoadKeyCloakIdentities ¶
func LoadKeyCloakIdentities(appl application.Application, users []account.User) ([]account.User, []account.Identity, error)
LoadKeyCloakIdentities loads keycloak identities for the users and returns the valid users along with their KC identities (if a user is missing his/her KC identity, he/she is filtered out of the result array)
Types ¶
type CollaboratorsController ¶
type CollaboratorsController struct { *goa.Controller // contains filtered or unexported fields }
CollaboratorsController implements the collaborators resource.
func NewCollaboratorsController ¶
func NewCollaboratorsController(service *goa.Service, db application.DB, config collaboratorsConfiguration, policyManager auth.AuthzPolicyManager) *CollaboratorsController
NewCollaboratorsController creates a collaborators controller.
func (*CollaboratorsController) Add ¶
func (c *CollaboratorsController) Add(ctx *app.AddCollaboratorsContext) error
Add user's identity to the list of space collaborators.
func (*CollaboratorsController) AddMany ¶
func (c *CollaboratorsController) AddMany(ctx *app.AddManyCollaboratorsContext) error
AddMany adds user's identities to the list of space collaborators.
func (*CollaboratorsController) List ¶
func (c *CollaboratorsController) List(ctx *app.ListCollaboratorsContext) error
List collaborators for the given space ID.
func (*CollaboratorsController) Remove ¶
func (c *CollaboratorsController) Remove(ctx *app.RemoveCollaboratorsContext) error
Remove user from the list of space collaborators.
func (*CollaboratorsController) RemoveMany ¶
func (c *CollaboratorsController) RemoveMany(ctx *app.RemoveManyCollaboratorsContext) error
RemoveMany removes users from the list of space collaborators.
type LinkController ¶
type LinkController struct { *goa.Controller Auth login.KeycloakOAuthService TokenManager token.Manager Configuration LoginConfiguration }
LinkController implements the link resource.
func NewLinkController ¶
func NewLinkController(service *goa.Service, auth *login.KeycloakOAuthProvider, tokenManager token.Manager, configuration LoginConfiguration) *LinkController
NewLinkController creates a link controller.
func (*LinkController) Callback ¶
func (c *LinkController) Callback(ctx *app.CallbackLinkContext) error
Callback redirects to original referel when Identity Provider account are linked to the user account
func (*LinkController) Link ¶
func (c *LinkController) Link(ctx *app.LinkLinkContext) error
Link links identity provider(s) to the user's account
func (*LinkController) Session ¶
func (c *LinkController) Session(ctx *app.SessionLinkContext) error
Session links identity provider(s) to the user's account
type LoginConfiguration ¶
type LoginConfiguration interface { GetKeycloakEndpointAuth(*goa.RequestData) (string, error) GetKeycloakEndpointToken(*goa.RequestData) (string, error) GetKeycloakAccountEndpoint(req *goa.RequestData) (string, error) GetKeycloakEndpointBroker(*goa.RequestData) (string, error) GetKeycloakEndpointEntitlement(*goa.RequestData) (string, error) GetKeycloakClientID() string GetKeycloakSecret() string IsPostgresDeveloperModeEnabled() bool GetKeycloakTestUserName() string GetKeycloakTestUserSecret() string GetKeycloakTestUser2Name() string GetKeycloakTestUser2Secret() string GetValidRedirectURLs() string GetHeaderMaxLength() int64 GetNotApprovedRedirect() string GetWITURL(*goa.RequestData) (string, error) }
type LoginController ¶
type LoginController struct { *goa.Controller Auth login.KeycloakOAuthService TokenManager token.Manager Configuration LoginConfiguration }
LoginController implements the login resource.
func NewLoginController ¶
func NewLoginController(service *goa.Service, auth *login.KeycloakOAuthProvider, tokenManager token.Manager, configuration LoginConfiguration) *LoginController
NewLoginController creates a login controller.
func (*LoginController) Login ¶
func (c *LoginController) Login(ctx *app.LoginLoginContext) error
Login runs the login action.
type LogoutController ¶
type LogoutController struct { *goa.Controller // contains filtered or unexported fields }
LogoutController implements the logout resource.
func NewLogoutController ¶
func NewLogoutController(service *goa.Service, logoutService *login.KeycloakLogoutService, configuration logoutConfiguration) *LogoutController
NewLogoutController creates a logout controller.
func (*LogoutController) Logout ¶
func (c *LogoutController) Logout(ctx *app.LogoutLogoutContext) error
Logout runs the logout action.
type ResourceController ¶
type ResourceController struct {
*goa.Controller
}
ResourceController implements the resource resource.
func NewResourceController ¶
func NewResourceController(service *goa.Service) *ResourceController
NewResourceController creates a resource controller.
func (*ResourceController) Delete ¶
func (c *ResourceController) Delete(ctx *app.DeleteResourceContext) error
Delete runs the delete action.
func (*ResourceController) Read ¶
func (c *ResourceController) Read(ctx *app.ReadResourceContext) error
Read runs the read action.
func (*ResourceController) Register ¶
func (c *ResourceController) Register(ctx *app.RegisterResourceContext) error
Register runs the register action.
func (*ResourceController) Update ¶
func (c *ResourceController) Update(ctx *app.UpdateResourceContext) error
Update runs the update action.
type SearchController ¶
type SearchController struct { *goa.Controller // contains filtered or unexported fields }
SearchController implements the search resource.
func NewSearchController ¶
func NewSearchController(service *goa.Service, db application.DB, configuration searchConfiguration) *SearchController
NewSearchController creates a search controller.
func (*SearchController) Users ¶
func (c *SearchController) Users(ctx *app.UsersSearchContext) error
Users runs the user search action.
type SpaceConfiguration ¶
type SpaceConfiguration interface { GetKeycloakEndpointAuthzResourceset(*goa.RequestData) (string, error) GetKeycloakEndpointToken(*goa.RequestData) (string, error) GetKeycloakEndpointClients(*goa.RequestData) (string, error) GetKeycloakEndpointAdmin(*goa.RequestData) (string, error) GetKeycloakClientID() string GetKeycloakSecret() string }
SpaceConfiguration represents space configuratoin
type SpaceController ¶
type SpaceController struct { *goa.Controller // contains filtered or unexported fields }
SpaceController implements the space resource.
func NewSpaceController ¶
func NewSpaceController(service *goa.Service, db application.DB, config SpaceConfiguration, resourceManager auth.AuthzResourceManager) *SpaceController
NewSpaceController creates a space controller.
func (*SpaceController) Create ¶
func (c *SpaceController) Create(ctx *app.CreateSpaceContext) error
Create runs the create action.
func (*SpaceController) Delete ¶
func (c *SpaceController) Delete(ctx *app.DeleteSpaceContext) error
Delete runs the delete action.
type StatusController ¶
type StatusController struct { *goa.Controller // contains filtered or unexported fields }
StatusController implements the status resource.
func NewStatusController ¶
func NewStatusController(service *goa.Service, db *gorm.DB) *StatusController
NewStatusController creates a status controller.
func (*StatusController) Show ¶
func (c *StatusController) Show(ctx *app.ShowStatusContext) error
Show runs the show action.
type TokenController ¶
type TokenController struct { *goa.Controller Auth login.KeycloakOAuthService TokenManager token.Manager Configuration LoginConfiguration // contains filtered or unexported fields }
TokenController implements the login resource.
func NewTokenController ¶
func NewTokenController(service *goa.Service, auth *login.KeycloakOAuthProvider, tokenManager token.Manager, configuration LoginConfiguration, identityRepository account.IdentityRepository) *TokenController
NewTokenController creates a token controller.
func (*TokenController) Generate ¶
func (c *TokenController) Generate(ctx *app.GenerateTokenContext) error
Generate obtain the access token from Keycloak for the test user
func (*TokenController) Keys ¶
func (c *TokenController) Keys(ctx *app.KeysTokenContext) error
Keys returns public keys which should be used to verify tokens
func (*TokenController) Refresh ¶
func (c *TokenController) Refresh(ctx *app.RefreshTokenContext) error
Refresh obtains a new access token using the refresh token.
type UserController ¶
type UserController struct { *goa.Controller // contains filtered or unexported fields }
UserController implements the user resource.
func NewUserController ¶
func NewUserController(service *goa.Service, db application.DB, tokenManager token.Manager, config UserControllerConfiguration) *UserController
NewUserController creates a user controller.
func (*UserController) Show ¶
func (c *UserController) Show(ctx *app.ShowUserContext) error
Show returns the authorized user based on the provided Token
type UserControllerConfiguration ¶
type UserControllerConfiguration interface {
GetCacheControlUser() string
}
UserControllerConfiguration the Configuration for the UserController
type UsersController ¶
type UsersController struct { *goa.Controller RemoteWITService remoteservice.RemoteWITService // contains filtered or unexported fields }
UsersController implements the users resource.
func NewUsersController ¶
func NewUsersController(service *goa.Service, db application.DB, config UsersControllerConfiguration, userProfileService login.UserProfileService) *UsersController
NewUsersController creates a users controller.
func (*UsersController) List ¶
func (c *UsersController) List(ctx *app.ListUsersContext) error
List runs the list action.
func (*UsersController) Show ¶
func (c *UsersController) Show(ctx *app.ShowUsersContext) error
Show runs the show action.
func (*UsersController) Update ¶
func (c *UsersController) Update(ctx *app.UpdateUsersContext) error
Update updates the authorized user based on the provided Token
type UsersControllerConfiguration ¶
type UsersControllerConfiguration interface { GetCacheControlUsers() string GetCacheControlUser() string GetKeycloakAccountEndpoint(*goa.RequestData) (string, error) GetWITURL(*goa.RequestData) (string, error) }
UsersControllerConfiguration the Configuration for the UsersController