Examples of Auth


Examples of bitbucket.Auth

   */
  public static void main(String[] args) {
    username = "myUsername";
    slug = "test";
   
    a = new Auth(username, "myPassword");
   
    test1();
  }
View Full Code Here

Examples of com.aetrion.flickr.auth.Auth

            e.printStackTrace();
        }
*/
       
        AuthInterface authInterface = flickr.getAuthInterface();
        Auth auth = authInterface.checkToken("72157625348978315-7c9ef5a03dc17410");
        RequestContext context = RequestContext.getRequestContext();
        context.setAuth(auth);

        Uploader up = new Uploader(key, shared);
        File file = new File("test.png");
View Full Code Here

Examples of com.aetrion.flickr.auth.Auth

                            key,shared,
                            new REST()
                    );

                    AuthInterface authInterface = flickr.getAuthInterface();
                    Auth auth = authInterface.checkToken(context.getSettings().getProperty(FLICKR_USER_TOKEN));
                    RequestContext context = RequestContext.getRequestContext();
                    context.setAuth(auth);

                    Uploader up = new Uploader(key, shared);
                    UploadMetaData meta = new UploadMetaData();
View Full Code Here

Examples of com.aetrion.flickr.auth.Auth

                    }))
                    .addControl(new Button("Continue >").onClicked(new Callback<ActionEvent>(){
                        public void call(ActionEvent event) {
                            stage.hide();
                            try {
                                Auth auth = authInterface.getToken(frob);
                                System.out.println("Authentication success");
                                // This token can be used until the user revokes it.
                                System.out.println("Token: " + auth.getToken());
                                String user_token = auth.getToken();
                                ChangeFlickrSettingsAction.this.context.getSettings().setProperty(FLICKR_USER_TOKEN,user_token);
                                String user_id = auth.getUser().getId();
                                ChangeFlickrSettingsAction.this.context.getSettings().setProperty(FLICKR_USER_ID,user_id);
                                System.out.println("nsid: " + auth.getUser().getId());
                                System.out.println("Realname: " + auth.getUser().getRealName());
                                System.out.println("Username: " + auth.getUser().getUsername());
                                System.out.println("Permission: " + auth.getPermission().getType());
                            } catch (FlickrException e) {
                                System.out.println("Authentication failed");
                                e.printStackTrace();
                            } catch (SAXException e) {
                                e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
View Full Code Here

Examples of com.alu.e3.data.model.Auth


  protected List<CallDescriptor> checkSubscriberIdAuth(String subscriberId, AuthIdentity authIdentity) throws GatewayException {

    // Get subscriber matching CallDescriptors
    Auth auth;
    try {
      auth = dataManager.getAuthById(subscriberId);
    } catch (InvalidIDException e) {
      throw new GatewayException(GatewayExceptionCode.AUTHORIZATION, e.getMessage() );
    }

    if (auth == null || !auth.getStatus().isActive()) {
      throw new GatewayException(GatewayExceptionCode.AUTHORIZATION, "Authorization status is invalid");
    }

    return   dataManager.getMatchingPolicies(authIdentity.getApi(), auth);
View Full Code Here

Examples of com.alu.e3.prov.restapi.model.Auth

  protected final Action newCreateAction() {
    return new  Action("create") {
      @Override
      protected Object doAction(Object... params) {

        Auth auth = (Auth) params[0];

        if ((auth.getId() == null) || (auth.getId().equals(""))) {
          auth.setId(UUID.randomUUID().toString());
        }

        com.alu.e3.prov.restapi.model.Error error = validate(auth);

        if(LOG.isDebugEnabled())
          LOG.debug("Creating Auth ID: {}", auth.getId());

        AuthResponse response = new AuthResponse(AuthResponse.SUCCESS);
        if(error == null){
          com.alu.e3.data.model.Auth authDataModel = BeanConverterUtil.toDataModel(auth);
          dataManager.addAuth(authDataModel);
          response.setId(auth.getId());
        }
        else{
          error.setErrorCode("400");
          response.setStatus(AuthResponse.FAILURE);
          response.setError(error);
View Full Code Here

Examples of com.bradmcevoy.http.Auth

    private final DigestHelper digestHelper = new DigestHelper(np);

    @Inject Objectify ofy;
   
  public Object authenticate(Resource r, Request request) {
        Auth auth = request.getAuthorization();
        DigestResponse resp = digestHelper.calculateResponse(auth, "freewebdav.appspot.com", request.getMethod());
        if( resp == null ) {
            log.finest("requested digest authentication is invalid or incorrectly formatted");
            return null;
        } else {
View Full Code Here

Examples of com.bradmcevoy.http.Auth

  @Override
  public Auth getAuthorization() {
        if (auth == null) {
          String h = getRequestHeader(Request.Header.AUTHORIZATION);
          if (StringUtils.isNotEmpty(h)) {
            auth = new Auth(h);
          }
        }
        return auth;
  }
View Full Code Here

Examples of com.sishuok.es.sys.auth.entity.Auth

            User user = userService.findOne(userId);
            if (user == null) {
                continue;
            }

            Auth auth = getAuthRepository().findByUserId(userId);
            if (auth != null) {
                auth.addRoleIds(m.getRoleIds());
                continue;
            }
            auth = new Auth();
            auth.setUserId(userId);
            auth.setType(m.getType());
            auth.setRoleIds(m.getRoleIds());
            save(auth);
        }
    }
View Full Code Here

Examples of com.sissi.protocol.iq.auth.Auth

    }
  }

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Auth auth = protocol.cast(Auth.class);
    AuthCallback callback = this.authCallbacks.get(auth.getMechanism());
    return callback != null ? !callback.auth(auth, context) : !context.write(Failure.INSTANCE_INVALIDMECHANISM).write(Stream.closeGraceFully()).close();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.