This project has retired. For details please refer to its
Attic page.
LoginService xref
1 package org.apache.archiva.redback.rest.api.services;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.archiva.redback.authorization.RedbackAuthorization;
23 import org.apache.archiva.redback.rest.api.model.LoginRequest;
24 import org.apache.archiva.redback.rest.api.model.User;
25
26 import javax.ws.rs.GET;
27 import javax.ws.rs.POST;
28 import javax.ws.rs.Path;
29 import javax.ws.rs.Produces;
30 import javax.ws.rs.QueryParam;
31 import javax.ws.rs.core.MediaType;
32
33 @Path( "/loginService/" )
34 public interface LoginService
35 {
36
37 @Path( "addAuthenticationKey" )
38 @GET
39 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
40 @RedbackAuthorization( noRestriction = true )
41 String addAuthenticationKey( @QueryParam( "providerKey" ) String providedKey,
42 @QueryParam( "principal" ) String principal, @QueryParam( "purpose" ) String purpose,
43 @QueryParam( "expirationMinutes" ) int expirationMinutes )
44 throws RedbackServiceException;
45
46
47 @Path( "ping" )
48 @GET
49 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
50 @RedbackAuthorization( noRestriction = true )
51 Boolean ping()
52 throws RedbackServiceException;
53
54
55 @Path( "pingWithAutz" )
56 @GET
57 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
58 @RedbackAuthorization( noRestriction = false, noPermission = true )
59 Boolean pingWithAutz()
60 throws RedbackServiceException;
61
62
63
64
65
66 @Path( "logIn" )
67 @POST
68 @RedbackAuthorization( noRestriction = true, noPermission = true )
69 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
70 User logIn( LoginRequest loginRequest )
71 throws RedbackServiceException;
72
73
74
75
76
77 @Path( "isLogged" )
78 @GET
79 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
80 @RedbackAuthorization( noRestriction = true )
81 User isLogged()
82 throws RedbackServiceException;
83
84
85
86
87
88 @Path( "logout" )
89 @GET
90 @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
91 @RedbackAuthorization( noRestriction = true, noPermission = true )
92 Boolean logout()
93 throws RedbackServiceException;
94 }