Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
c19c2846
Commit
c19c2846
authored
8 years ago
by
gakin
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-4394 : Commit ommitted change to fix build
SVN: 37889
parent
683136ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/common/ServiceFinderUtils.java
+13
-0
13 additions, 0 deletions
...ic/server/dss/plugins/sync/common/ServiceFinderUtils.java
with
13 additions
and
0 deletions
datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/common/ServiceFinderUtils.java
+
13
−
0
View file @
c19c2846
...
...
@@ -16,10 +16,12 @@
package
ch.ethz.sis.openbis.generic.server.dss.plugins.sync.common
;
import
ch.systemsx.cisd.common.exceptions.UserFailureException
;
import
ch.systemsx.cisd.openbis.common.api.client.IServicePinger
;
import
ch.systemsx.cisd.openbis.common.api.client.ServiceFinder
;
import
ch.systemsx.cisd.openbis.generic.server.jython.api.v1.impl.EncapsulatedCommonServer
;
import
ch.systemsx.cisd.openbis.generic.shared.ICommonServer
;
import
ch.systemsx.cisd.openbis.generic.shared.dto.SessionContextDTO
;
/**
*
...
...
@@ -43,6 +45,17 @@ public class ServiceFinderUtils
});
return
commonServer
;
}
public
static
String
login
(
ICommonServer
commonServer
,
String
user
,
String
password
)
{
SessionContextDTO
session
=
commonServer
.
tryAuthenticate
(
user
,
password
);
if
(
session
==
null
)
{
throw
UserFailureException
.
fromTemplate
(
"Invalid username/password combination for user:"
+
user
);
}
return
session
.
getSessionToken
();
}
public
static
EncapsulatedCommonServer
getEncapsulatedCommonServer
(
String
sessionToken
,
String
openBisServerUrl
)
{
return
EncapsulatedCommonServer
.
create
(
getCommonServer
(
openBisServerUrl
),
sessionToken
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment